×

Operating System Tutorial

Operating System Practice

Process States in Operating System

In this tutorial, we will learn about the various process states in Operating System. By Himanshu Singh Bisht Last updated : May 06, 2023

What is the process in Operating System?

The process is the running instance of the running instance of a program which occupies space in memory (RAM), a program is a passive entity and process is an active entity.

What are the Process States in Operating System?

When a process is created it passes through some states. The following are the process states in an operating system:

  1. New State
  2. Ready State
  3. Running State
  4. Waiting State
  5. Suspended State
  6. Terminated State
process 1

1. New State

When a program is double-clicked like a program.exe file in windows, the process comes in new state and a process ID is provided to it and it starts loading in memory. The process of selecting a process for loading in memory is done by Long Term Scheduler.

2. Ready State

When a program is double-clicked like a program.exe file in windows, the process comes in new state and a process ID is provided to it and it starts loading in memory. The process of selecting a process for loading in memory is done by Long Term Scheduler.

3. Running State

The Short-term scheduler selects a process from ready queue to run (i.e provide CPU), then process state become running. At this moment instruction of the program is executing.

4. Waiting State

The process often requires input/output from various devices for that purpose process move to a new state called waiting for a state where the process performs input and output from devices like monitor, keyboard etc. If a process is already performing I/O then other process wait for their turn in device waiting queue.

5. Suspended State

As the memory is limited it cannot contain multi-process at any instance, suppose a new process want to come in memory but there is required space available, and this process has high priority so mid-term scheduler will select a process of low priority and place it in swap area of hard disk, so that when space is available it can again be called out . This state of a process is suspended.

6. Terminated State

When a process performs all the task then PCB of the process is deleted and a process is removed from the memory.




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.