What are process states?


A process is a program in execution and it is more than a program code called as text section and this concept works under all the operating system because all the task perform by the operating system needs a process to perform the task

The process executes when it changes the state. The state of a process is defined by the current activity of the process.

Each process may be in any one of the following states −

  • New − The process is being created.

  • Running − In this state the instructions are being executed.

  • Waiting − The process is in waiting state until an event occurs like I/O operation completion or receiving a signal.

  • Ready − The process is waiting to be assigned to a processor.

  • Terminated − the process has finished execution.

It is important to know that only one process can be running on any processor at any instant. Many processes may be ready and waiting.

Now let us see the state diagram of these process states −

Explanation

Step 1 − Whenever a new process is created, it is admitted into ready state.

Step 2 − If no other process is present at running state, it is dispatched to running based on scheduler dispatcher.

Step 3 − If any higher priority process is ready, the uncompleted process will be sent to the waiting state from the running state.

Step 4 − Whenever I/O or event is completed the process will send back to ready state based on the interrupt signal given by the running state.

Step 5 − Whenever the execution of a process is completed in running state, it will exit to terminate state, which is the completion of process.

Updated on: 07-Nov-2023

45K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements