OPERATING SYSTEMS/Student Engineering Notebook
Page 15·notes
I/O SYSTEMS & DISK SCHEDULING—~22 MIN READ·GATE CS LENS

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

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.

LABORATORY · INTERACTIVE SIMULATION —Concept Exploration

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.

Storage & Disk Arm Simulator

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.

Initial HeadCylinder 53
Total Cylinders0 → 199
Total Head Movement331 Cylinders
Total Serviced8 requests
053 (Start)199536567981221241831993714
Servicing Order:53 → 65 → 67 → 98 → 122 → 124 → 183 → 199 → 37 → 14

3. Algorithm Comparison: SCAN vs. C-SCAN vs. LOOK

Comparing arm trajectory heuristics.

Feature / AspectSCAN (Elevator)C-SCAN (Circular SCAN)
Arm Movement PatternSweeps 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 CylindersFavors requests near the ends of the disk platter.Provides more uniform wait times across all cylinders.
LOOK vs SCAN differenceLOOK 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.

GATE LENS · EXAM PREPARATION

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.

EXAM WEIGHTAGE & FOCUS:

Disk scheduling calculations appear frequently in GATE CS as 2-mark numerical problems.

recurring exam patterns:
  • •Given initial head position, arm direction, and a list of requested tracks, calculate the total head movement in cylinders.
⚠ common student traps:
  • •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 problem
GATE-style question · 2 MarksC-SCAN: (End - Start) + (End - 0) + (Last request - 0).

Consider 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)?

A. 187 cylinders
B. 382 cylinders
C. 386 cylinders
D. 236 cylinders
RAPID REVIEW · NOTEBOOK SUMMARY

5. 1-Minute Panic Revision

core principle:

“Disk Scheduling minimizes Seek Time. Seek time = physical arm movement across tracks.”

must-remember principles:
  • •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.
critical exam pitfalls:
  • •SCAN visits cylinder 0 or 199 even if no request exists there.
  • •LOOK reverses at the last actual request, saving head travel.
decision flow & invariants:
[ DISK SCHEDULING ALGORITHMS TRAJECTORY COMPARISON ] Platter Cylinders: [ 0 ──────────────── 53 (Head) ──────────────── 199 ] • FCFS: Jumps haphazardly to whatever arrives first (highest seek time). • SSTF: Greedy jump to nearest cylinder (starvation for distant cylinders). • SCAN: [ 53 ──────────> 199 (Disk Edge) ] ──reverses──> [ 37 ──────> 14 ] * Always reaches extreme boundary (0 or 199)! • LOOK: [ 53 ──────────> 183 (Last Request) ] ──reverses──> [ 37 ────> 14 ] * Reverses at the farthest request without wasting travel to edge. • C-SCAN: [ 53 ──> 199 ] ──fast jump to 0 (no service)──> [ 0 ──> 14 ──> 37 ] • C-LOOK: [ 53 ──> 183 ] ──fast jump to 14 (no service)──> [ 14 ──> 37 ]
SOURCE TRANSPARENCY & CITATIONS

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.

Primary Academic Texts
Operating System Concepts (10th Edition)↗by Silberschatz, Galvin, Gagne · Chapter 11: Mass-Storage Structure (Section 11.4: Disk Scheduling Algorithms)

Official Chapter 11 slides illustrating seek times, head trajectories, SSTF starvation, and elevator SCAN/LOOK algorithms.

ACADEMIC STANDARD
Operating Systems: Three Easy Pieces (OSTEP)↗by Remzi H. Arpaci-Dusseau & Andrea C. Arpaci-Dusseau · Chapter 37: Hard Disk Drives (Geometry, Latency & I/O Scheduling)

Full chapter analyzing seek time, rotational delay, transfer time, and disk scheduling algorithms (SSTF, SCAN, SPTF).

ACADEMIC STANDARD
Curated University Lecture Series
NPTEL: Operating Systems↗Prof. Santanu Chattopadhyay (IIT Kharagpur) · Secondary Storage & Disk Scheduling

University lecture on magnetic disk geometry, track addressing, and head movement minimization.

LECTURE SERIES
ALTERNATIVE PEDAGOGICAL PERSPECTIVES

If the textbook derivation did not click immediately, consult these targeted video lessons:

SCAN Disk Scheduling Algorithm with Example | Operating SystemGate Smashers (Varun Singla) (13 mins)

Demonstrates number line calculations and highlights why SCAN must touch the extreme boundary (0 or 199) before reversing.

Watch Lesson↗
SSTF in Disk Scheduling with Example | Operating SystemGate Smashers (Varun Singla) (11 mins)

Step-by-step track difference calculation comparing FCFS vs SSTF total seek distances.

Watch Lesson↗
RECOMMENDED YOUTUBE LECTURES & EDUCATORS: MODULE 9: I/O SYSTEMS & DISK SCHEDULING

Curated lectures on Disk Geometry, Seek Time, Rotational Latency, FCFS, SSTF, SCAN, C-SCAN & LOOK:

Gate Smashers · L-6.3 & L-6.6: Disk Scheduling Algorithms & SCAN Algorithm↗Instructor: Varun Singla · Covers: SSTF starvation risks, Elevator (SCAN) algorithm, Cylinder boundaries (0 and N-1) head movements

Easy-to-follow cylinder timeline diagrams calculating Total Head Movement without errors.

Open YouTube↗
Gate Smashers · L-6.8 & L-6.9: C-SCAN & C-LOOK Disk Scheduling with Example↗Instructor: Varun Singla · Covers: Circular return travel, C-SCAN vs C-LOOK endpoint servicing, Uniform wait time advantages

Clear differentiation on when the disk head reverses at the extreme track vs the last request.

Open YouTube↗
Neso Academy · Mass Storage Structure & Disk Access Time Breakdown↗Instructor: Neso Academy · Covers: Disk Platter geometry, Tracks, Sectors, Seek Time + Rotational Latency (1 / 2*RPM) + Transfer Rate

Clean mathematical derivations of average rotational delay and disk transfer bandwidth.

Open YouTube↗
Knowledge Gate · Disk Scheduling GATE PYQs & Total Head Travel↗Instructor: Sanchit Jain · Covers: GATE PYQs on SCAN direction assumptions ('currently moving toward higher track numbers'), Cylinder math

Formula shortcuts for quickly subtracting max-min track positions during competitive exams.

Open YouTube↗