Traditional mechanical hard drives used the Elevator Algorithm (SCAN/C-LOOK) to avoid thrashing disk head actuators back and forth. Modern Linux NVMe SSDs use the `none` / `mq-deadline` multi-queue scheduler to exploit parallel NAND flash channels with zero mechanical seek overhead.
Visual representation of control loops, memory layout, and execution flow for Disk Scheduling Algorithms & I/O Subsystems.
Total Access Time = Seek Time (moving mechanical arm to target cylinder, ~3-10ms) + Rotational Latency (rotating platter to target sector, ~2-4ms) + Transfer Time (reading data bits).
Seek time is by far the largest latency component on mechanical HDDs; disk scheduling algorithms specifically minimize total head movement distance.
The disk arm sweeps across cylinders in one direction servicing requests along its path, then reverses (SCAN) or jumps back to the beginning without servicing (C-SCAN).
Solid State Drives (SSDs) have zero mechanical seek time. They use Flash Translation Layers (FTL), wear leveling, TRIM commands, and multi-queue scheduling (blk-mq).
| Feature / Dimension | SSTF (Shortest Seek Time First) | C-SCAN (Circular SCAN / Elevator) |
|---|---|---|
| Scheduling Policy | Services the pending request closest to the current head position. | Moves head in one direction servicing requests, then jumps back to the start without servicing on return. |
| Starvation Risk | HIGH: Requests for distant tracks will starve if nearby requests arrive continuously. | ZERO: Guarantees bounded waiting time for all disk cylinders. |
| Wait Time Uniformity | Non-uniform: Favors requests clustered around current head location. | Extremely uniform: Equal treatment for requests regardless of cylinder location. |
| Optimal Use Case | Light workloads with localized cluster access. | Heavy sustained workloads with requests distributed uniformly across disk. |
Detailed answers, interviewer pro tips, key takeaway summaries, and code examples formulated for technical rounds.
✅ Correction: SSTF suffers from severe Starvation. If a stream of requests arrives near cylinder 50, a request waiting at cylinder 180 may never be serviced.
Disk scheduling orders I/O requests to minimize mechanical seek time and optimize storage throughput.