🎓 BookMCQ
← Back to 10. Mass Storage Structure

📝 SSTF scheduling in Disk Scheduling (9 MCQs)

Shortest Seek Time First Request Selection

Shortest Seek Time First is a disk-scheduling algorithm that selects the pending request requiring the smallest head movement from the current cylinder. It attempts to reduce total mechanical movement by servicing geographically close requests before more distant ones. The disk scheduler repeatedly evaluates the current head position and waiting requests, selecting the nearest candidate whenever the device becomes ready for another operation.

Why Nearest-Cylinder Selection Reduces Mechanical Movement

FCFS may move the disk head across large distances even when another pending request is nearby. SSTF reduces this unnecessary movement by selecting the closest cylinder first. However, continuously favouring nearby requests can postpone requests located far from frequently visited regions. Its performance therefore involves a trade-off between reducing seek distance and providing fair access.

Finding the Nearest Pending Cylinder

When the current disk operation completes, the scheduler compares the head position with every pending cylinder request. It selects the request with the smallest absolute distance, services it, and updates the head position. The comparison is repeated using the new position. If two requests are equally distant, the implementation must apply an appropriate tie-breaking rule.

Tracing SSTF from Cylinder Fifty

Assume the head starts at cylinder 50 with pending requests 82, 170, 43, and 140. SSTF selects 43 first because it is seven cylinders away. From 43, it selects 82, then 140, and finally 170. This sequence demonstrates how successive nearest-request decisions determine the service order and total head movement.

Improved Seek Performance and Starvation Risk

SSTF generally reduces average seek movement compared with FCFS, especially when requests are clustered. However, distant requests can experience long waiting times if nearby requests continue arriving. Its selection process also requires examining pending requests, adding scheduling overhead. Real implementations may combine locality optimisation with fairness rules to prevent indefinite postponement.

Clarifying SSTF and Other Scheduling Policies

'SSTF always services requests in arrival order' is incorrect because it selects the nearest pending cylinder. 'SSTF always moves in one direction' is incorrect because the closest request may lie on either side. 'SSTF guarantees that every request eventually receives service' is incorrect because continuous arrivals near the head can starve distant requests.

Exam Focus: Nearest-Request Selection and Seek Calculation

At each scheduling step, calculate the distance from the current head position to every pending request. Select the smallest value, update the head location, and repeat until all requests are serviced. Calculate total movement by adding absolute differences. Compare SSTF with FCFS and explain why reduced average seek movement does not guarantee freedom from starvation.

Key Terms of SSTF Scheduling

  • SSTF - Selects the nearest pending request.
  • Seek distance - Cylinder movement required.
  • Current head - Present disk position.
  • Pending request - Unserviced disk operation.
  • Starvation - Indefinite request postponement.
  • Tie-breaking - Resolves equal distances.
2
Easy
4
Medium
3
Hard

📝 All SSTF scheduling in Disk Scheduling MCQs

Q1. The disk arm is currently at cylinder 45. Pending requests are for cylinders 10, 22, 48, 70, and 90. Which request will the SSTF algorithm select next?

A.10
B.22
C.48 ✅
D.70
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The SSTF rule chooses the request whose cylinder is closest to the current head position. From cylinder 45, the distances are 35 to 10, 23 to 22, 3 to 48, 25 to 70, and 45 to 90. The smallest distance is 3, so cylinder 48 is selected. The other choices are farther away, so they would increase seek time. Selecting the nearest request minimizes the immediate movement, which improves overall response time in real‑world disk workloads.

Q2. What is the primary goal of the Shortest Seek Time First (SSTF) disk scheduling algorithm?

A.Minimize rotational latency
B.Minimize total seek distance ✅
C.Maximize throughput
D.Ensure fairness
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: SSTF focuses on reducing the distance the disk arm must travel between consecutive requests. By always picking the request with the shortest seek distance, the algorithm directly lowers the total amount of head movement. Rotational latency, throughput, and fairness are secondary effects; they may improve or degrade, but the core objective is to keep the cumulative seek distance as small as possible, which speeds up I/O processing.

Q3. SSTF scheduling primarily attempts to reduce which component of disk access time?

A.Seek time ✅
B.Rotational latency
C.Data transfer time
D.Queueing delay
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Seek time refers to the period needed for the read/write heads to move to the target cylinder. SSTF selects the request with the smallest cylinder distance, thereby shortening the mechanical movement required. Rotational latency depends on disk spin, data transfer time on the amount of data moved, and queueing delay on scheduling order, none of which are directly targeted by SSTF. Hence, the algorithm’s main effect is on seek time.

Q4. A disk head is at cylinder 200. The pending request queue contains cylinders 180, 220, 150, 210, and 190. In what order will SSTF service these requests?

A.190, 210, 180, 220, 150 ✅
B.210, 190, 180, 220, 150
C.190, 180, 210, 220, 150
D.210, 220, 190, 180, 150
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Starting at 200, the nearest cylinders are 190 and 210, each 10 away. SSTF typically breaks ties by choosing the lower cylinder, so 190 is served first. After moving to 190, the distances become 210 (20), 180 (10), 220 (30), and 150 (40); the next closest is 180. Continuing this process yields the sequence 190 → 210 → 180 → 220 → 150. The other options either ignore the tie‑breaking rule or select a farther cylinder before a nearer one, which would increase total head movement.

Q5. Why can the SSTF algorithm cause starvation for some disk requests?

A.It always moves the head outward
B.It selects the farthest request each time
C.It may repeatedly choose closer requests, delaying distant ones ✅
D.It requires the disk to spin faster
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: SSTF always picks the request with the smallest remaining distance. If new requests keep arriving near the current head position, the algorithm will continue to serve them, while a request located far away may never become the closest choice and thus can be postponed indefinitely. This behavior does not stem from head direction or spin speed; it is a direct consequence of the algorithm’s focus on immediate proximity, leading to possible starvation of distant requests.

Q6. A disk head is at cylinder 50. The request sequence is 95, 180, 34, 119, 11, 123. Which algorithm results in less total head movement?

A.SSTF ✅
B.FCFS
C.Both equal
D.Neither
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: FCFS processes requests in arrival order, producing movements of 45 + 85 + 146 + 85 + 108 + 112 = 581 cylinders. SSTF always selects the nearest cylinder: 50→34 (16), →11 (23), →95 (84), →119 (24), →123 (4), →180 (57), totaling 208 cylinders. Because SSTF minimizes each individual seek, the overall distance traveled is far smaller than FCFS. The other choices are incorrect: FCFS yields a much larger total, and the totals are not equal. This illustrates how SSTF can dramatically reduce mechanical effort in real disk operations.

Q7. Compared to the SCAN (elevator) algorithm, SSTF generally provides which of the following trade‑offs?

A.Higher average seek time but no starvation
B.Lower average seek time but possible starvation ✅
C.Equal average seek time and equal fairness
D.Higher throughput but greater rotational latency
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: SCAN moves the head in one direction, servicing all requests along the way, which guarantees fairness and avoids starvation but often incurs longer average seeks because it must travel to the end of the disk before reversing. SSTF, by always choosing the nearest request, typically achieves a lower average seek distance, improving response time. However, because it never guarantees service for far‑away requests, those can be starved. Thus the correct trade‑off is lower average seek time with a risk of starvation.

Q8. A real‑time database requires that each disk request be completed within 5 ms. The disk can move the head at 10 cm/ms and each cylinder is 0.1 cm apart. The current head position is at cylinder 100, and the pending requests are at cylinders 102, 150, 180, and 190. Should the OS use SSTF to meet the deadline?

A.Yes, because SSTF minimizes seek time and all deadlines will be met
B.No, because SSTF may cause the farthest request to miss its deadline ✅
C.Yes, because the closest request is within the deadline and others are not needed
D.No, because SSTF cannot guarantee deadline adherence in this scenario
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: SSTF selects the nearest request, so the head would first move to cylinder 102 (2 cm) in 0.2 ms, easily meeting its deadline. However, the remaining far‑away requests (150 → 180 → 190) require much larger movements: 50 cm to 150 (5 ms), then additional travel to 180 (3 ms) and 190 (1 ms). The cumulative time for the farthest request exceeds the 5 ms limit, meaning SSTF could cause the last request to miss its deadline. Therefore, SSTF is not suitable when strict timing guarantees are required.

Q9. Assume a disk with 500 cylinders. The head is at cylinder 250. The pending queue contains cylinders 260, 240, 300, 200, and 260 again (duplicate). Under SSTF, which cylinder will be serviced first and why?

A.260 (first occurrence)
B.240 ✅
C.300
D.200
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: From cylinder 250, the distances are: 260 → 10, 240 → 10, 300 → 50, 200 → 50. When two requests are equally close, SSTF typically resolves the tie by choosing the lower cylinder number, which is 240. Selecting 260 first would also be a valid tie‑break, but the conventional rule prefers the smaller address, ensuring a deterministic order. The other options are farther away, so they would not be selected first, and choosing them would increase the immediate seek distance unnecessarily.

🔗 Related Topics (MCQs)