1. Introduction
A process does not execute continuously from the moment it is created until it terminates. During its lifetime, a process undergoes a series of state changes as it competes for CPU time, waits for resources, performs I/O operations, and interacts with the operating system.
The operating system tracks the status of every process using a formal model known as the Process State Diagram. This model represents the various states a process can occupy and the transitions that occur between them.
These state transitions are governed by:
CPU scheduling decisions
I/O operations
Interrupts
System calls
Resource availability
Understanding process states is fundamental because many advanced operating system concepts—including scheduling, context switching, synchronization, and concurrency—are built upon this model.
The Process State Diagram provides a conceptual framework for understanding:
How processes progress through their lifecycle
How CPU resources are allocated
How multitasking systems operate efficiently
2. Basic Process States
A process typically moves through five fundamental states during its lifetime.
These states are:
New
Ready
Running
Waiting (Blocked)
Terminated
The complete process state diagram can be represented as:
+--------+
| New |
+--------+
|
v
+--------+
| Ready |
+--------+
|
v
+--------+
|Running |
+--------+
/ | \
/ | \
v v v
+--------+ +--------+ +-----------+
|Waiting | | Ready | |Terminated |
+--------+ +--------+ +-----------+
|
v
+--------+
| Ready |
+--------+
Each state represents a different stage in the execution lifecycle of a process.
3. Why Process States Are Necessary
Modern operating systems often manage hundreds or thousands of processes simultaneously.
However:
CPU resources are limited
Only a small number of processes can execute at a given moment
The operating system therefore needs a mechanism to track:
Which processes are executing
Which processes are waiting
Which processes are ready to run
Which processes have completed
Process states provide this mechanism.
They allow the operating system to:
Manage CPU allocation efficiently
Implement multitasking
Support concurrency
Maintain process control
4. Detailed Explanation of Each State
4.1 New State
The New State represents a process that is currently being created.
At this stage:
The operating system has received a request to create a process
Necessary resources are being allocated
Process structures are being initialized
Operations performed include:
PCB creation
PID assignment
Memory allocation
Scheduling parameter initialization
The process is not yet eligible for CPU execution.
Characteristics
Process creation in progress
PCB being initialized
Resources being allocated
Not yet in ready queue
Example
When a user launches a web browser:
User Launches Browser
|
v
New State
The operating system begins creating the process.
4.2 Ready State
The Ready State represents a process that is prepared to execute but is waiting for CPU allocation.
At this stage:
All necessary resources have been allocated
Process is fully initialized
Process can execute immediately
The only missing resource is:
CPU Time
Ready processes are stored in a structure called the:
Ready Queue
Characteristics
Ready to execute
Waiting for CPU
Stored in ready queue
Not currently running
Example
Suppose three processes are waiting:
Ready Queue
P1
P2
P3
The scheduler will eventually select one process for execution.
Important Observation
In a busy system, processes often spend significant time in the Ready State waiting for CPU allocation.
4.3 Running State
The Running State indicates that the process is currently executing instructions on the CPU.
The process has:
Been selected by the scheduler
Received CPU allocation
Started execution
While running:
Instructions are executed
Computations are performed
System calls may occur
Characteristics
Currently executing
Occupying CPU
Actively making progress
Single-Core Systems
Only one process can be running at a given instant.
CPU
|
v
Process A
Multi-Core Systems
Multiple processes may run simultaneously.
Example:
Core 1 → P1
Core 2 → P2
Core 3 → P3
Core 4 → P4
Each CPU core can execute one process at a time.
4.4 Waiting (Blocked) State
The Waiting State (also called the Blocked State) represents a process that cannot continue execution until a particular event occurs.
Common reasons include:
Disk I/O
Network I/O
User input
Resource availability
Synchronization events
Because the process cannot make progress:
CPU allocation would be wasted
The operating system therefore removes it from execution until the required event occurs.
Characteristics
Waiting for an external event
Cannot execute immediately
Not eligible for CPU scheduling
Example
Suppose a process requests disk access:
Process
|
Disk Read Request
|
Waiting State
The process remains blocked until the disk operation completes.
Important Observation
Many real-world applications spend a large portion of their lifetime in the Waiting State.
Examples:
Browsers waiting for network responses
Databases waiting for disk reads
4.5 Terminated State
The Terminated State represents a process that has completed execution.
At this stage:
Program has finished
Resources are released
Process removed from scheduling system
The operating system performs cleanup operations such as:
Memory deallocation
File closure
PCB removal
Resource reclamation
Characteristics
Execution completed
No longer scheduled
Resources released
Causes of Termination
Normal Completion
Program finishes successfully.
Explicit Termination
User terminates process.
Error Condition
Process crashes due to:
Invalid memory access
Illegal instruction
Fatal exception
5. State Transitions
Processes continuously move between states during execution.
5.1 New → Ready
Occurs when:
Process creation completes
Initialization finished
The process enters the Ready Queue.
New → Ready
5.2 Ready → Running
Occurs when:
CPU scheduler selects the process
The process receives CPU time.
Ready → Running
5.3 Running → Waiting
Occurs when:
Process requests I/O
Process waits for event
Resource unavailable
Running → Waiting
Example:
Disk read operation
5.4 Waiting → Ready
Occurs when:
Event completes
I/O finishes
Resource becomes available
The process returns to the Ready Queue.
Waiting → Ready
5.5 Running → Ready
Occurs due to:
Preemption
The scheduler removes the process from CPU execution.
Common reason:
Time quantum expires
Running → Ready
The process returns to the Ready Queue.
5.6 Running → Terminated
Occurs when:
Execution completes
Process exits
Process is killed
Running → Terminated
The operating system releases all resources.
6. Queues Associated with States
The operating system manages processes using queues.
Ready Queue
Contains:
Processes ready for execution
Waiting for:
CPU allocation
Example:
Ready Queue
P1
P2
P3
P4
Waiting Queue
Contains:
Blocked processes
Waiting for:
I/O completion
Events
Resources
Example:
Disk Waiting Queue
P5
P6
P7
Different waiting queues may exist for different devices.
7. Role of the Scheduler
The scheduler is responsible for deciding:
Which process executes next
When preemption occurs
How CPU time is shared
The scheduler continuously monitors:
Ready Queue
|
v
Scheduler
|
v
Running
Its primary objective is:
Efficient CPU utilization
Fair process execution
Good responsiveness
The scheduler is central to all CPU scheduling algorithms.
8. Extended State Model (Advanced)
Some operating systems use additional states beyond the basic five-state model.
These states become important when memory management and swapping are involved.
Ready Suspended
The process is:
Ready to execute
Swapped out of main memory
Characteristics:
Cannot run immediately
Must first be brought back into memory
Blocked Suspended
The process is:
Waiting for an event
Swapped out of memory
Characteristics:
Event not yet completed
Not currently resident in RAM
These states help operating systems manage memory efficiently under heavy workloads.
9. Key Observations
A Process Rarely Stays Running
Most processes spend relatively little time executing.
They often alternate between:
Ready
Waiting
states.
Scheduling Decisions Occur at Transitions
The scheduler becomes active during events such as:
Running → Ready
Waiting → Ready
New → Ready
Efficient State Management Is Critical
Poor state management leads to:
Low CPU utilization
Poor responsiveness
Increased waiting times
Efficient transition handling is therefore a major operating system objective.
10. Practical Execution Flow
A typical process lifecycle may appear as:
New
↓
Ready
↓
Running
↓
Waiting
↓
Ready
↓
Running
↓
Waiting
↓
Ready
↓
Running
↓
Terminated
The cycle between:
Running
Waiting
Ready
may repeat many times depending on the process workload.
CPU-bound processes may spend more time:
Running
I/O-bound processes may spend more time:
Waiting