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

Discussion

Consider a disk queue with request for input/output to block on cylinders 98, 183, 37, 122, 14, 124, 65 and 67 in that order. Assume that the disk head is initially positioned at cylinder 53 and moving towards cylinder O. The total number of head movements using Shortest Seek Time First (SSTF) and SCAN algorithms are respectively :

  • A.236 and 252 cylinders
  • B.640 and 236 cylinders
  • C.235 and 640 cylinders
  • D.236 and 236 cylinders

Answer: D

The totals are 236 and 236 cylinders.

SSTF always serves the nearest pending request. From 53 the order is 65, 67, 37, 14, 98, 122, 124, 183:

12 + 2 + 30 + 23 + 84 + 24 + 2 + 59 = 236 cylinders.

SCAN moves towards cylinder 0 first, serving 37 and 14 on the way, reaches 0, then reverses and sweeps up to the last request, 183:

(53 - 0) + (183 - 0) = 53 + 183 = 236 cylinders.

640 is the first-come-first-served total for this queue, and 252 is not produced by either algorithm here, so the other options mix in the wrong figures.

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

Post your comment

Please log in or register to post a comment.