Consider a disk queue with requests for I/O to blocks on cylinders 98, 183,…

2017

Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 37, 122, 14, 124, 65, 67. Suppose SSTF disk scheduling algorithm implemented to meet the requests then the total number of head movements are __________ if the disk head is initially at 53.

  1. A.

    224

  2. B.

    248

  3. C.

    236

  4. D.

    240

Attempted by 109 students.

Show answer & explanation

Correct answer: C

Solution (SSTF computation):

Start at head position 53. At each step pick the request with the smallest distance from the current head position.

  1. Move from 53 to 65: distance = 12, cumulative = 12.

  2. Move from 65 to 67: distance = 2, cumulative = 14.

  3. Move from 67 to 37: distance = 30, cumulative = 44.

  4. Move from 37 to 14: distance = 23, cumulative = 67.

  5. Move from 14 to 98: distance = 84, cumulative = 151.

  6. Move from 98 to 122: distance = 24, cumulative = 175.

  7. Move from 122 to 124: distance = 2, cumulative = 177.

  8. Move from 124 to 183: distance = 59, cumulative = 236.

Therefore, the total head movement using SSTF starting at 53 is 236.

Service order produced by SSTF: 65, 67, 37, 14, 98, 122, 124, 183.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor