Machine-translated by Google. Questions are authored in English.
Top

Discussion

Suppose a disk has 201 cylinders, numbered 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinder 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.

  • A.1
  • B.2
  • C.3
  • D.4

Answer: C

Cylinder 90 is serviced after 3 requests.

SSTF always serves the pending request nearest the current head position. Starting at 100:

  1. 100 (distance 0)
  2. 105 (distance 5, nearer than 90 at 10)
  3. 110 (distance 5, nearer than 90 at 15)
  4. 90 (distance 20, nearer than 135 at 25)

So the requests for 100, 105 and 110 are served before 90. Counting 1 or 2 forgets that the request at cylinder 100 itself counts, or that 110 is nearer than 90 once the head is at 105.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.