Last modified on February 14th, 2021
What is Two state process model?
In this model, we consider two main states of the process. These two states are
State 1: Process is Running on CPU
State 2: Process is Not Running on CPU
New: First of all when a new process is created, then it is in Not Running State. Suppose a new process P2 is created then P2 is in NOT Running State.
CPU: When the CPU becomes free, Dispatcher allows the P2 to use the CPU. Before this P2 was in waiting for the state in a waiting queue.
Dispatcher: Dispatcher is a program that gives the CPU to the process selected by the CPU scheduler. Suppose dispatcher allows P2 to execute on CPU.
Running: When the dispatcher allows P2 to execute on the CPU then P2 starts its execution. Here we can say that P2 is in running state.
Now, according to priority scheduling, if any process with high priority wants to execute on CPU, Suppose P3 with high priority, then P2 should be the pause or we can say that P2 will be in waiting state and P3 will be in running state.
Now, when P3 terminates then P2 again allows the dispatcher to execute on CPU.
Download Slides (Powerpoint Presentation) and PDF of Process Model
- Download Two states, Five state and 7 state process model Slides Presentation
- Download Two states, Five states, and 7 state process model PDF File
Important Question of 2 state process model
Where we save the states of the process?
PCB is used to save the states of the processes.
You must know the 7 state diagram in os | queuing diagram for the seven-state process model | five state process model in operating system ppt | implementation of the process in os | explain the different process states| verify that a process follows the two-state model.