Disk Scheduling: SSTF, SCAN, C-SCAN & LOOK
“Minimizing mechanical head seek time across cylinders with real arm trajectory simulations.”
1.Magnetic Disk Access Time Components
§ 9.1.On magnetic hard disk drives (HDDs), reading or writing a sector requires physical mechanical movements. The total access time is composed of three components:
1. Seek Time: The time required for the physical disk arm to position the read/write head over the desired cylinder/track. This is by far the slowest mechanical component (typically 3–10 ms).
2. Rotational Latency: The time required for the desired disk sector to rotate under the read/write head. On average, this is half a revolution: 1 / (2 × RPM).
3. Transfer Time: The time required to stream data bytes from magnetic media to the controller buffer.
Because seek time dominates total access time, Disk Scheduling Algorithms seek to order pending I/O track requests to minimize total head movement.
2. Interactive Disk Scheduling Simulator
Select different algorithms (FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK) to visualize the disk arm's sweep across cylinders 0 to 199 and compute total cylinder movement.
Disk Head Movement & Cylinder Trajectory Simulator
Observe how Elevator (SCAN/LOOK) and Circular (C-SCAN/C-LOOK) algorithms trade head movement for more predictable service. They do not categorically eliminate starvation under every workload or implementation.
3. Algorithm Comparison: SCAN vs. C-SCAN vs. LOOK
Comparing arm trajectory heuristics.
| Feature / Aspect | SCAN (Elevator) | C-SCAN (Circular SCAN) |
|---|---|---|
| Arm Movement Pattern | Sweeps in one direction to the disk boundary (0 or Max), then reverses direction. | Sweeps in one direction to the end, then immediately returns to the beginning without servicing requests on return. |
| Fairness to Edge Cylinders | Favors requests near the ends of the disk platter. | Provides more uniform wait times across all cylinders. |
| LOOK vs SCAN difference | LOOK goes only as far as the last request in that direction; SCAN always travels to cylinder 0 or Max. | C-LOOK jumps to the lowest requested cylinder; C-SCAN jumps all the way to cylinder 0. |
✎ Takeaway: LOOK and C-LOOK optimize SCAN by avoiding unnecessary trips to the extreme boundaries (0 and Max) when no requests exist there.
4. GATE Lens & Verified PYQs
Syllabus focus, recurring numerical patterns, common traps, and clearly labelled exam practice. Questions remain source-pending until an official paper and answer key are attached.
Disk scheduling calculations appear frequently in GATE CS as 2-mark numerical problems.
- •Given initial head position, arm direction, and a list of requested tracks, calculate the total head movement in cylinders.
- •Read carefully whether the algorithm is SCAN vs LOOK! SCAN travels all the way to boundary 199/0; LOOK reverses at the farthest request!
- •In C-SCAN, check whether the return jump from end to 0 is counted in head movement (in standard GATE problems, it IS counted as travel distance).
Exam Practice / Source Verification Required
1 problemConsider a disk queue with requests for I/O to blocks on cylinders 98, 183, 37, 122, 14, 124, 65, 67. The head is currently at cylinder 53 moving toward larger cylinder numbers. Total cylinders: 0 to 199. Using C-SCAN algorithm, what is the total head movement (in cylinders)?
5. 1-Minute Panic Revision
“Disk Scheduling minimizes Seek Time. Seek time = physical arm movement across tracks.”
- •SSTF: Greedy, picks closest request. Suffers from starvation.
- •SCAN: Elevator algorithm. Moves to end cylinder (0 or Max), reverses.
- •LOOK: Reverses at the farthest request (does not go to physical boundary).
- •C-SCAN / C-LOOK: Unidirectional service with fast return jump.
- •SCAN visits cylinder 0 or 199 even if no request exists there.
- •LOOK reverses at the last actual request, saving head travel.
Primary Academic References & Exam Sources
Every concept in Notes From a B.Tech Brain is synthesized from authoritative academic texts, seminal peer-reviewed research, verified exam archives, and renowned university lectures.
Official Chapter 11 slides illustrating seek times, head trajectories, SSTF starvation, and elevator SCAN/LOOK algorithms.
Full chapter analyzing seek time, rotational delay, transfer time, and disk scheduling algorithms (SSTF, SCAN, SPTF).
University lecture on magnetic disk geometry, track addressing, and head movement minimization.
If the textbook derivation did not click immediately, consult these targeted video lessons:
Demonstrates number line calculations and highlights why SCAN must touch the extreme boundary (0 or 199) before reversing.
Step-by-step track difference calculation comparing FCFS vs SSTF total seek distances.
Curated lectures on Disk Geometry, Seek Time, Rotational Latency, FCFS, SSTF, SCAN, C-SCAN & LOOK:
Easy-to-follow cylinder timeline diagrams calculating Total Head Movement without errors.
Clear differentiation on when the disk head reverses at the extreme track vs the last request.
Clean mathematical derivations of average rotational delay and disk transfer bandwidth.
Formula shortcuts for quickly subtracting max-min track positions during competitive exams.