|
Introduction ContinuedMonday, September 13 Process StatesWe examined processes in more detail, first from the general perspective and then from the Unix-specific example. A general process state diagram that one might find in a traditional textbook is given below. In reality, there are many more states that a process may be in at any one time in a real operating system. The traditional view of process states in Unix is given in the diagram below.
In this diagram, states 3 and 7 are really identical, but are shown as different for clarity. That is, if a process is preempted it is placed in the "ready to run state" (and in a ready to run queue); it is also placed in this same state if it has been awakened from sleep by the receipt of a signal. Process InformationWhat information does an OS need to keep around about a process in order to manage the running of processes? In every OS there must be a list of processes kept, with each entry in the list holding all of the information necessary about that process to allow the OS to do its job. In Unix, the traditional structure for keeping process information is the process table. This table is a fixed size array, where each table entry holds information about the process (entry 0 holds information about process 0, entry 1 holds information about process 1, and so on). The size of this table is the maximum number of processes allowed. The size can be changed by modifying the kernel to have a larger table and then recompiling the kernel (it is possible that the size of this table could be a parameter to main when the program is started). Traditional Unix splits the information about a process in two.
This was intended to save space. Word from one member of the class is that Linux does not make this separation and that all information is in the process table. We started to identify the specific kinds of information needed to be kept for a process as class ended. |
|