• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
November 04, 2022 |1.3K Views
Three State Process Model in Operating System
  Share  1 Like
Description
Discussion

In this video, we will be discussing what is three state process model in detail.

Need of Three State Process Model

The three-state process model was developed to overcome the drawbacks of the two-state process model in the operating system. 
In the two-state process model, each process had only two possible states namely Running and Not Running. 
In such a scenario, the CPU will remain idle when the process is not running. Also, when the dispatcher switches a process from the not running state to a running state, the process might still be waiting for some input/output operation. To select the appropriate process for execution, the dispatcher must traverse the queue of waiting processes and find a process that is ready to execute immediately. 

This search for the appropriate process leads to waste of time, thereby, reducing the performance of the system. To overcome this drawback, the three process model came into existence. 

What is Three State Process Model

The three state model divides the Not Running state of the two process model into two different states. 
1) Ready State: In this state, the process is ready and is waiting to be executed. 
2) Blocked State: In this state, the process does not execute until an event occurs such as the completion of an I/O operation. 

Running State: In this state, the process is currently executing. 
In this model, the OS ensures that only one process stays in running state. However, multiple processes can be present in waiting or blocked states. If a process has to enter the running state, it will first enter the ready state. 

While a process is running, one of the two conditions might arise: 
1) The process enters the wait state. 
2) The process gets a time-out condition and exits the system. 

In first case, the process goes to the blocked state and then ready state. 
In the second scenario, the process is put back into the ready queue. 

Three state process model in OS:
 https://www.geeksforgeeks.org/three-state-process-model-in-operating-system/

Read More