| Department of Computer Science Course: CS 3725 | |
In order for virtual memory management to be effective, the system must be possible to execute several processes concurrently, with the processor switching back and forth among processes.
We will now consider the problem of allocating the processor itself to those processes. We have already seen that, for a single processor system, if two (or more) processes are in memory at the same time, then each process must be able to assume at least 3 states, as follows:
Real operating systems require more process states.
We have already seen a simplified process state diagram for the UNIX
operating system;
Figure
shows
a more realistic process state diagram for the UNIX system.
Figure: A simplified UNIX process state diagram
In the operating system, each process is represented by its own process control block (sometimes called a task control block, or job control block). This process control block is a data structure (or set of structures) which contains information about the process. This information includes everything required to continue the process if it is blocked for any reason (or if it is interrupted). Typical information would include:
In many systems, this space for these process control blocks is allocated (in system space memory) when the system is generated, and places a firm limit on the number of processes which can be allocated at one time. (The simplicity of this allocation makes it attractive, even though it may waste part of system memory by having blocks allocated which are rarely used.)
Figure
shows
a diagram of the process management data structures for an early
UNIX system.
Figure: Process management data structurees for an early version of UNIX System 5