One of the states is the waiting state in which the process is waiting for some event or an I/O operation to complete. However, if too many processes are waiting, then the memory becomes full and there is no space for a running process.
The waiting processes are swapped out and swapped in, to free more memory for running processes.
Swap-In and Swap-Out
This is a very simple technique in which a process get Swapped-Out of the memory to the disk because it will not be used for some time and whenever the process is required, it is Swapped-In from the disk.
The waiting states are also called the Blocked states. This block state becomes suspended state after it is swapped out to the disk. We now get to new suspend states
In the Block-Suspend state, the process cannot do anything because it is swapped-out and blocked. The Ready-Suspend state is a state in which the process is swapped out and waiting for some event to happen so that it can become ready again.
The external storage used for Swapping-In and Swapping-Out of processes is called Page File.
Updated Process State Diagram
Transition Between States
There are no new states, therefore the transition of states include these new states.The list of new transition is as follows
Block State – Block Suspended
Block Suspended – Ready Suspended
Ready – Ready Suspended (when some higher priority process comes)
Block Suspended – Block When there is process with higher priority than ready)
New – Ready Suspended
The process Blocked and then swapped out to free some memory when the process is not likely to be used for some time. This lead to two new process states – Block Suspended and Ready Suspended