Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105, 110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder 90 is serviced after servicing ____ number of requests.
Explanation
Starting at 100: nearest is 100 itself (distance 0, serviced 1st), then 105 (distance 5, 2nd), then 110 (distance 5 from 105, 3rd), then from 110 the nearest remaining is 90 (distance 20, vs 135 at distance 25) — 90 is serviced 4th, i.e. AFTER 3 other requests (100, 105, 110).
Source: GATE CS 2014 (Session 1) (2014)
This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.