Operating Systems · Revision notes
CPU Scheduling Algorithms
The CPU scheduler picks which ready process runs next. This chapter defines the criteria (waiting, turnaround, response time) and works through FCFS, SJF/SRTF, Priority, Round Robin and multilevel queues with Gantt-chart numericals in GATE style.
Quick revision
- TAT = CT - AT; WT = TAT - BT; RT = first start - AT
- FCFS: convoy effect; SJF/SRTF: optimal avg WT but starvation
- Priority: starvation fixed by aging; inversion fixed by inheritance
- RR: (n-1)q max wait; large q → FCFS, tiny q → overhead
- MLFQ: demote CPU hogs, keep I/O-bound jobs high
- Always draw the Gantt chart and mark idle gaps