Process States & State Transitions in Operating Systems: Notes, PYQs & 100-Question Practice Sets
In Operating Systems, a Process is formally defined as a program under execution. Understanding how processes move through execution states, how the CPU scheduler dispatches threads, and how the kernel handles swapping is one of the highest-weightage topics in the DSSSB TGT/PGT Computer Science recruitment exam.
1. Standard 5-State Process Model
During its execution lifecycle, a process transitions through standard states maintained in main memory and managed by the operating system kernel:
- New (Created): The program is being initialized and loaded from secondary storage by the Long-Term Scheduler.
- Ready: The process is loaded in RAM and waiting in the Ready Queue for CPU time allocation.
- Running: Instructions are actively executing on the CPU core.
- Waiting / Blocked: The process is suspended waiting for an event or I/O request (such as disk read, keyboard input, or lock acquisition).
- Terminated (Exit): The process finishes execution and its resources are deallocated.
2. Process State Transition Matrix
Understanding which component triggers state transitions is crucial for competitive exams. The following matrix summarizes standard transitions:
| From State | To State | Triggering Event / Mechanism | Transition Nature |
|---|---|---|---|
| New | Ready | Admitted to main memory (Job Scheduler) | Admitted |
| Ready | Running | CPU allocation by Short-Term Scheduler (Dispatcher) | Dispatched |
| Running | Ready | Time quantum expiry (timer interrupt) or higher-priority preemption | Involuntary |
| Running | Waiting | Blocking system call or waiting for I/O event | Voluntary |
| Waiting | Ready | I/O operation complete or event signal received | Interrupt |
| Running | Terminated | Normal exit system call or abort signal (SIGKILL, SIGSEGV) | Exit / Deallocate |
3. The 7-State Model & Swapped Processes
When physical memory (RAM) is exhausted, the Medium-Term Scheduler (Swapper) swaps waiting processes out to secondary storage (Swap Space), introducing two suspended states:
- Blocked-Suspend: A process that is waiting for an I/O event and currently resides on secondary storage.
- Ready-Suspend: A process in secondary storage that is ready to execute as soon as space is made available in main memory.
4. Process Control Block (PCB) & Context Switching
Every active process is represented in the operating system by a Process Control Block (PCB) (also called a Task Control Block):
- Process State: Ready, Running, Blocked, etc.
- Program Counter (PC): Address of the next machine instruction to be fetched.
- CPU Registers: Accumulators, index registers, stack pointers saved during context switches.
- CPU Scheduling Metadata: Process priority and queue pointers.
- Memory Management Info: Page tables, segment tables, and base/limit registers.
- I/O Status: List of allocated devices and open file descriptor tables.
5. Practice Quiz (100 Questions in 10 Sets)
Test your knowledge with 10 sets of previous year and high-probability practice questions. Note: You can select an answer only once per question; complete the set to view your total score and detailed explanations, or restart the set to try again.
Detailed Review & Explanations:
6. Frequently Asked Questions (Quick Revision)
init or systemd). A Zombie process has terminated execution, but its exit entry remains in the Process Table because its parent has not yet executed the wait() system call..png)