Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Define a process, its states with the help of a diagram ?

Process:

  • A process is an instance of a running program on a computer system.
  • It represents the execution of a specific task or application by the CPU.
  • Each process has its own memory space, program code, data, and system resources, which are managed by the operating system.
  • Processes can transition through different states during their lifecycle.

A process passes from number of states during its life, states are as follows


1) New state
2) Ready state
3) Running state
4) Wait state
5) Termination state
6) Suspend ready state
7) Suspend wait state

Description of all the states are as follows-

New State:
First state is known as new state. New state is the state when the process is under creation.

Ready State:
When the process is created new state comes, which is called ready state.
After creation process comes under ready state.
In ready state more than one process can also come.
For example: One process is created at the same time second process is created then both the process will come under ready state.

Running State:
From ready state we have to select a process, and then have to allot CPU to that process for run.
When CPU is allotted to process in ready state that process comes in running state.
In running state only one process can stay at a time. Because CPU can be allotted to single process at a time.

Wait State:
When a process request for input/output than that process will left the running state, and will join new state known as wait state.
In wait state more than one process can stay.

After completion of I/O request process will go to ready state.

From ready state the process will go to again running state.

Termination State:When process comes in running state, there is no more input output request by the process, because it’s already get completed.
So process will go to termination state.

These are the basic states in process state diagram.

Ready state and wait state can contain many processes, so their size gets increases.

Suspend ready state:
When ready state is not able to occupy more states in it, than some states are suspended in suspended state.

Suspend ready state will be in secondary memory not in primary memory.

When ready state get space for new processes than, processes from suspended ready state gets switch back to ready state.
Such transaction is known as resume.

Suspend wait state:
Similarly suspend wait state is also reside in process state diagram.