Shortest Seek Time First (SSTF)
What you'll learn: How SSTF disk scheduling minimizes seek time by always servicing the nearest pending request, and why that "greedy" approach can starve distant requests.
The Core Idea
After FCFS proved inefficient for disk scheduling, SSTF offers a simple optimization: always service the disk request that requires the smallest seek distance from the current head position.
Think of it like a delivery driver who always goes to the nearest customer next instead of following the order requests came in. This minimizes total travel time—but customers far away might wait indefinitely if nearby orders keep coming.
How SSTF Works
The disk scheduler examines all pending requests and calculates the seek distance from the current head position to each one. It picks the request with the minimum seek time and services it next. The process repeats from the new head position.
Example
If the disk head is at track 50 and requests are waiting at tracks 98, 183, 37, 122, 14:
- Distance to 98: 48 tracks
- Distance to 37: 13 tracks ← selected first
- Distance to 14: 23 tracks
- ...and so on
After servicing 37, the head moves there and recalculates from that position.
The Starvation Problem
SSTF is greedy and locally optimal, but not globally fair. If new requests keep arriving near the current head position, requests far away may never get serviced—this is starvation. A request at track 200 might wait indefinitely if requests keep appearing in the 40–60 range.
This makes SSTF unsuitable for systems requiring guaranteed response times.
Key Takeaway:
SSTF minimizes average seek time by servicing the nearest request, but risks starving distant requests when new nearby requests continuously arrive.