One of the most fundamental concepts of modern operating systems is the distinction between a program and the activity of executing a program. The former is a static set of directions, whereas the latter is a dynamic activity whose properties change as time progresses. The activity of executing a program under the control of the operating system is known as a process.
Associated with a process is the current status of the activity, called the process state. This state includes the current position in the program being executed (the value of the program counter) as well as the values in the other CPU registers and the associated memory cells. Roughly speaking, the process state is a snapshot of the machine at a particular time. At different times during the execution of a program (at different times in a process) different snapshots (different process states) will be observed.
The tasks associated with coordinating the execution of processes are handled by the scheduler and dispatcher within the operating system’s kernel. The scheduler maintains a record of the processes present in the computer system, introduces new processes to this pool, and removes completed processes from the pool. Thus when a user requests the execution of an application, it is the scheduler that adds the execution of that application to the pool of current processes.
To keep track of all the processes, the scheduler maintains a block of information in main memory called the process table. Each time the execution of a program is requested, the scheduler creates a new entry for that process in the process table. This entry contains such information as the memory area assigned to the process, the priority of the process, and whether the process is ready or waiting.
A process is ready if it is in a state in which its progress can continue; it is waiting if its progress is currently delayed until some external event occurs, such as the