Course Content
Operating Systems (OS)
Process States & State Transition Diagram

In a multitasking operating system, a process doesn’t stay in one state from start to finish. Instead, it moves through a series of well-defined states, depending on what it’s doing and how the system manages it. These transitions help the OS track what the process is currently doing and what it should do next.

 

Understanding process states and their transitions is essential to grasp how the operating system handles multitasking and resource management.

 



What Are Process States?

A process state represents the current activity or condition of a process. The operating system uses these states to manage when and how each process should be executed.

 

Here are the common states:

 

  • New
    The process is being created. It has not yet started execution.

 

  • Ready
    The process is ready to run and is waiting for CPU allocation.

 

  • Running
    The process is currently being executed by the CPU.

 

  • Waiting (Blocked)
    The process cannot continue until an external event happens (e.g., input/output completion).

 

  • Terminated (Exit)
    The process has finished execution or has been forcefully stopped.

Additional States (in some systems)

  • Suspended: The process is in secondary memory, paused temporarily.
  • Ready Suspended / Blocked Suspended: Hybrid states for advanced scheduling strategies.

State Transition Diagram

The State Transition Diagram visually represents how a process moves between states based on different system events.

 

Here’s a simplified explanation of transitions:

 

  • New → Ready: After creation, the process enters the ready queue.
  • Ready → Running: The OS scheduler picks the process for execution.
  • Running → Waiting: If the process requests I/O or a resource, it moves to waiting.
  • Waiting → Ready: Once the requested event is completed, it re-enters the ready queue.
  • Running → Ready: If the CPU time expires or a higher-priority process arrives, it goes back to ready.
  • Running → Terminated: The process completes its task or is killed.

 

This diagram reflects how the OS makes real-time decisions on what to do with every active process.


 Why Are These States Important?

  • They allow the OS to handle multiple processes efficiently.
  • Help in process scheduling, resource allocation, and system monitoring.
  • Provide a systematic way to perform context switching between processes.

Summary

Process states and their transitions define the lifecycle of a process in an operating system. From being created to getting CPU time, waiting for resources, and eventually terminating, every step is tracked and managed using well-defined states. The transition diagram is a blueprint for how the OS handles tasks in a multitasking environment.

0% Complete
WhatsApp Icon

Hi Instagram Fam!
Get a FREE Cheat Sheet on System Design.

Hi LinkedIn Fam!
Get a FREE Cheat Sheet on System Design

Loved Our YouTube Videos? Get a FREE Cheat Sheet on System Design.