Page 50 - DCAP103_Principle of operating system
P. 50
Unit 2: Process Management-I
2.1.2 Process States Notes
During the lifespan of a process, its execution status may be in one of four states (associated
with each state is usually a queue on which the process resides):
• Executing: The process is currently running and has control of a CPU.
• Waiting: The process is currently able to run, but must wait until a CPU becomes available.
• Blocked: The process is currently waiting on I/O, either for input to arrive or output to
be sent.
• Suspended: The process is currently able to run, but for some reason the OS has not placed
the process on the ready queue.
• Ready: The process is in memory, will execute given CPU time.
Figure 2.1: Diagram of Process State
New Admitted Interrupt Exit Terminated
Ready Running
Scheduler dispatch
I/O or event completion I/O or event wait
Waiting
• Terminated: The process has finished execution. These state names are arbitrary, and they
vary across operating systems. The states that they represent are found on all systems,
however. Certain operating systems more finely delineate process states.
Only one process can be running on any processor at any instant, although
many processes may be ready and waiting.
2.2 Process Control Block
Each process is represented in the operating system by a process control block (PCB), also
called a task control block. A PCB is shown in Figure 2.2. It contains many pieces of information
associated with a specific process, including these:
LOVELY PROFESSIONAL UNIVERSITY 43