Two State Process Model in operating systems

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 CPU becomes free, Dispatcher gives control of the CPU to P2 that is in NOT Running state and waiting in a queue.

Dispatcher: Dispatcher is a program that gives control of the CPU to the process selected by the CPU scheduler. Suppose dispatcher allow 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, 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.

process model

Figure: Two State Process Model

Fazal Rehman Shamil Click Here to Know More
Instructor, Researcher, Blogger, SEO Expert, Poet and Publisher of International Journal Of Software, Technology & Science ISSN : 2616 - 5325
Dear Professors and Resarchers!You are welome to Cite these tutorials in your research or slides etc. Please don't forget to mention the reference of website. Copy Paste of text is strcitly forbidden. Images can be reuse because images are protected with watermark.

One Reply to “Two State Process Model in operating systems”

Leave a Reply

Your email address will not be published. Required fields are marked *