A mechanical arm physically moves to read your data. The order you serve competing requests changes everything.
START SCROLLING
Step through each component. Toggle between the 3D side view and the top-down platter diagram.
Order matters. Same 8 requests — two different approaches, radically different outcomes.
FCFS SEEK PATH — HEAD ZIGZAGS WILDLY
Seek time: the one cost we control
Physical arm movement time, proportional to distance.
The problem: wrong order forces enormous unnecessary travel. Disk scheduling is how the OS decides the right order.
Disk scheduling is the algorithm the OS uses to decide the order in which pending disk I/O requests are served, with the goal of minimising total head movement.
OPTIMISES
Total seek distance
IGNORES
Rotational latency, transfer time
APPLIES TO
HDDs only. SSDs have no moving parts.
REQUESTS QUEUING FOR THE DISK HEAD
Think of it as a taxi dispatcher: one cab, many pick-up points. The dispatcher finds the most efficient route through all of them.
Every algorithm references these. Learn them here, read the rest without friction.
Seek Time
Head movement time
Time for the arm to move from one track to another. The dominant cost in HDD performance.
Request Queue
Pending I/O list
Track numbers requested but not yet served. The scheduler reorders this list to minimise movement.
Starvation
A request never served
When a far-away request waits indefinitely because the algorithm always picks closer ones first.
Throughput
Requests per unit time
How many I/O requests complete per second. Less seek distance directly means higher throughput.
Each one fixes a flaw in the previous. Click a card to expand it.
Head starts at track 53. Requests: 98, 183, 37, 122, 14, 124, 65, 67
How it works: Requests are served exactly in arrival order. No consideration of head position at all.
Seek sequence
53 to 98(+45) to 183(+85) to 37(+146) to 122(+85) to 14(+108) to 124(+110) to 65(+59) to 67(+2)
Head position trace
Seek path chart
Advantages
Disadvantages
How it works: Always pick the closest pending request to the current head position. Greedy, one move at a time.
Seek sequence
53 to 65(+12, nearest) to 67(+2) to 98(+31) to 122(+24) to 124(+2) to 183(+59) to 37(+146) to 14(+23)
Head position trace
Seek path chart
Advantages
Disadvantages
How it works: Sweep in one direction serving everything encountered. On reaching the disk edge, reverse and sweep back.
Seek sequence (moving right first)
53 to 65 to 67 to 98 to 122 to 124 to 183 to 199 (disk edge) to 37 to 14
Head position trace
Seek path chart
Advantages
Disadvantages
How it works: Like SCAN, but reverses at the last actual request in each direction, not the disk edge. No wasted travel.
Seek sequence (moving right first)
53 to 65 to 67 to 98 to 122 to 124 to 183 (reverses) to 37 to 14
Head position trace
Seek path chart
Advantages
Disadvantages
Same 8 requests. All four algorithms. Shorter bar is better.
Put in your own queue and test your predictions.
Open the disk schedulerNO LOGIN. NO INSTALL. RUNS IN BROWSER.