GATE / CS ARCHIVE

GATE CSE 2014 SET 1 / QUESTION 19

GATE CSE 2014 Set 1 Q19

Operating Systems · I/O & Disk Scheduling · Full GATE CSE 2014 Set 1 paper

GATE 2014 Set 1, Q19 1 mark · NAT
Report issue

I/O & Disk Scheduling

Question 19, GATE 2014: A disk has cylinders 0 through 200. The arm is at 100, with pending requests 30,85,90,100,105,110,135,145. Under shortest-seek-time-first scheduling, how many requests are serviced before request 90?
Tap to enlarge
Answer & solution

Official answer: 3

1. Method and setup. At each step recompute distances from the current head position; SSTF is not a one-time sort by distance from 100. The request already at the head is a request serviced before any movement. Once at 110, compare the distances to 90 and 135 rather than continuing upward automatically.

2. Work through the result and its assumptions. SSTF first services the zero-distance request 100, then 105, then 110. From110, 90 is 20 cylinders away, closer than 135 at 25. Thus90 is serviced after 3 requests.

Original paper, page 12 · Answer key