When there is no process then the state is null. However, when a process is created then it changes many states during it’s lifetime. The state information for a process is kept in a Process Control Block (PCB).
- New State – The process is created recently.
- Running State – The process is being executed currently.
- Waiting State – Waiting for some Event or Input/Output to finish, etc.
- Ready State – Just before being assigned to a processor.
- Terminated – The process finished execution.
Process State Diagram
The figure above shows that process change states due to various reasons and here is a list of transitions that happen between processes. Not necessarily in the same order.
- Null -> New
- New -> Ready
- Ready -> Running
- Running -> Terminated
- Running -> Blocked
- Blocked -> Ready
- Running -> Ready
- Ready -> Terminated
- Waiting -> Terminated
Note – Running – Ready (This happens when process is removed from running due to a scheduling algorithm such as Round Robin, Priority Queue)
Abraham Silberschatz, Peter B. Galvin, Greg Gagne, A Silberschatz. 2012. Operating System Concepts, 9th Edition. Wiley.