Process Model in Operating System and its 5 states and Transitions

What is a process model?

In a computer system, the operating system is designed in such a way that it can perform more than one task simultaneously from a single processor. 

Similarly, the art of getting more than one task done by the processor is called the process model. 

The following types of work of the processor will be called process model: 

  • Even if a single user is running the operating system, the processor continues to execute many programs.
  • All the information being executed by the processor is hidden. 
  • In this, the processor keeps on executing more than one program simultaneously.

Work of Process model

If there are three programs to process simultaneously, the processor will manage the processing of those programs as follows:

work of process model

In the above picture, an attempt has been made to show how the three programs are being processed. Here the process happens one after the other and continues till the last statement of the program is processed.

Read Also - What is Computer?

5 State of Process Model

The process model has the following 5 states which are as follows:

  1. New
  2. Ready
  3. Running
  4. Waiting
  5. Exit

Process States and Transitions :

When a program is processed in a computer system, its state also changes. Whenever a program enters for processing, 

It passes through different memory of the processor and reaches the process queue, from where it is processed at certain time intervals according to the process schedule. 

Let us understand the state of the process in the following picture:

Process States and Transitions in os

The states given in the above picture work as follows

1) New:

A process is formed in this state.

2) Ready:

In this state, the processor prepares for execution and waits until it is given process time for execution by the local operating system.

3) Running:

In this state, the processor starts execution and continues to execute until it is given to another program for processing by the operating system.

4) Waiting:

The processor reaches this state when some type of user input/output operation is required to further the processing of the current program. When this happens, the processor goes into an idle state till then, and as soon as the inputs are received, it continues the processing.

5) Exit:

The program enters this state when the execution is complete. In this state, the program gets terminated.

Process State Transmission:

The entry for the execution of the program and the process in the following three states is called transmission:

Ready to running:

According to the schedule, the program enters the running state from this ready state for the process.

Running to waiting:

When the processor needs some kind of input and it has not received it, it enters the waiting state from running.

Waiting to ready:

When it receives the type of input that the processor is waiting for, it takes the program back to the ready state for further processing.

Running to ready:

When more than one program is made available for processing by the operating system, then the next program has to be processed according to the scheduling determined by the operating system, then in such a situation the running to ready state works.

Post a Comment