Questions
3–4 questions per semester exam
Difficulty
Medium
Importance
High yield for Operating Systems core papers
Overview
Process Management is a fundamental pillar of Operating Systems that governs how a CPU executes concurrent tasks efficiently. Understanding how the OS tracks state transitions, schedules jobs, and manages resource overhead through context switching is essential for high-scoring answers in university examinations.
Process States and PCB
A process transitions through various stages during its lifecycle, documented in a Process Control Block (PCB). The PCB is a data structure used by the kernel to store all necessary information to resume a process after an interrupt.
- Major States: New, Ready, Running, Waiting, Terminated
- PCB Contents: Process ID, Program Counter, CPU Registers, Memory Limits
- Transition: Scheduler dispatch moves process from Ready to Running
- Transition: I/O or event wait moves process from Running to Waiting
- PCB ensures OS can implement multiprogramming effectively
Process Scheduling Algorithms
Scheduling algorithms determine the order of process execution to maximize CPU utilization and minimize response time. These are categorized into non-preemptive and preemptive types based on whether the CPU can be taken away from a process.
- First-Come, First-Served (FCFS): Non-preemptive, prone to Convoy effect
- Shortest Job First (SJF): Minimizes average waiting time
- Round Robin (RR): Preemptive, relies on a fixed Time Quantum
- Priority Scheduling: Based on urgency or importance level
- Multilevel Queue: Processes partitioned into separate queues
Context Switching
Context switching is the overhead process of saving the state of the currently running process and loading the state of a new process. While necessary for multitasking, frequent switching leads to performance degradation due to CPU idle time.
- Involves saving the PCB of the current process
- Reloading the PCB of the next scheduled process
- Performed by the CPU Dispatcher
- Context switch time is pure overhead and non-productive
- Hardware support can reduce switch latency
Formula Sheet
Turnaround Time = Completion Time - Arrival Time
Waiting Time = Turnaround Time - Burst Time
CPU Utilization = (Total Time - Idle Time) / Total Time * 100
Exam Tip
Always draw the Process State Transition Diagram and a clean Gantt chart for scheduling problems, as these carry the most marks in descriptive papers.
Common Mistakes
- Confusing the 'Ready' state with the 'Running' state during diagrammatic representations.
- Failing to account for arrival time in SJF or Round Robin calculations, leading to wrong Gantt charts.
- Neglecting to mention the overhead of context switching when discussing the efficiency of time-slicing algorithms.
More Revision Notes
Ready to test yourself?
Play topic-wise Process Management questions in Aspirant Arcade — gamified MCQ practice.
Download Free