-
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.
-
- 1
- 2
- 3
- 4
Correct Option: C
Remember that in SSTF algo the request with shortest seek fine from “current Head Position” is serviced first. We prepare the following table:
Initially Head is of 100, so it services Request for 100 itself. Then 105 is serviced because it is nearest to 100. Now as head is at 105, Request for ‘110’ is serviced as it is nearer than 90. Finally as head is on 110, out of two nearest requests viz. 90 & 135, ‘90’ is serviced since it is nearer than “135”. 80, ‘90’ is serviced after servicing 3 Requests.