Disk Scheduling Algorithm Comparison
- Process Management
- Memory Management
- Deadlocks
- OS Introduction & Fundamentals
- CPU Scheduling Algorithms
- Threads & Concurrency
- Inter-Process Communication (IPC)
- Process Synchronization
- Virtual Memory & Paging
- File Systems
- Disk Scheduling
- I/O Management
Putting All Five Algorithms Side by Side
| Algorithm | Core idea | Main weakness |
|---|---|---|
| FCFS | Service in arrival order | Can cause large, erratic head movement |
| SSTF | Always service the nearest request | Can starve requests far from the head |
| SCAN | Sweep fully in one direction, then reverse | Travels to disk ends even with no nearby requests |
| C-SCAN | One-directional sweep, jump back to start | Wasted travel to and during the return jump |
| LOOK / C-LOOK | Same as SCAN/C-SCAN, but only as far as actually needed | Slightly more complex to implement |
The Same Underlying Trade-off, Seen Again
This is genuinely the same tension covered throughout the CPU scheduling section: SSTF optimizes purely for efficiency (like SJF does for CPU scheduling) at the cost of fairness, while SCAN/LOOK-family algorithms trade a little raw efficiency for guaranteed, more predictable service to every request.
Two Different Metrics That Can Actually Conflict
Minimizing total head movement isn't automatically the same goal as minimizing the worst-case wait for any individual request - an algorithm optimized for one of these metrics can genuinely perform worse on the other, which is exactly why different algorithms exist rather than one single obvious winner.
Why This Entire Topic Matters Less on Modern SSDs, But Still Matters
Solid-state drives have no mechanical head at all, so physical seek distance is largely irrelevant to them - but the same underlying scheduling and fairness trade-offs still appear in other resource management contexts throughout an operating system, wherever competing requests share a limited, physically or logically constrained resource.
How a Real System Actually Chooses Among These
The right choice genuinely depends on actual workload patterns - a system with fairly evenly distributed requests across the disk benefits most from LOOK/C-LOOK's balance of efficiency and fairness, while a system prioritizing raw minimum total movement above all else might still favor SSTF, accepting its fairness trade-off as a deliberate, acceptable cost.