Consider a disk system with 100 cylinders. The request to access the cylinders…

2017

Consider a disk system with 100 cylinders. The request to access the cylinders occur in the following sequences 4, 37, 10, 7, 19, 73, 2, 15, 6, 20 Assuming the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1 ms to move from one cylinder to adjacent one and shortest seek time first algorithm is used.

Answer: B. 119 msecShortest Seek Time First (SSTF) is a disk-scheduling policy that, instead of following arrival order, always sends the disk head next to whichever pending…

  1. A.

    95 msec

  2. B.

    119 msec

  3. C.

    233 msec

  4. D.

    276 msec

Attempted by 188 students.

Show answer & explanation

Correct answer: B

Shortest Seek Time First (SSTF) is a disk-scheduling policy that, instead of following arrival order, always sends the disk head next to whichever pending request is at the smallest absolute cylinder-distance from the head's current position. After each move, the head's position is updated to that cylinder before picking the next nearest one, and the total seek time is the sum of all these cylinder-to-cylinder jumps (here, 1 ms per cylinder moved).

Applying this to the given request queue, starting with the head at cylinder 50:

  1. Head at 50; nearest pending cylinder is 37 (|50 − 37| = 13). Move there — running seek total: 13.

  2. From 37; nearest remaining cylinder is 20 (|37 − 20| = 17). Running total: 13 + 17 = 30.

  3. From 20; nearest remaining cylinder is 19 (|20 − 19| = 1). Running total: 31.

  4. From 19; nearest remaining cylinder is 15 (|19 − 15| = 4). Running total: 35.

  5. From 15; nearest remaining cylinder is 10 (|15 − 10| = 5). Running total: 40.

  6. From 10; nearest remaining cylinder is 7 (|10 − 7| = 3). Running total: 43.

  7. From 7; nearest remaining cylinder is 6 (|7 − 6| = 1). Running total: 44.

  8. From 6; nearest remaining cylinder is 4 (|6 − 4| = 2). Running total: 46.

  9. From 4; nearest remaining cylinder is 2 (|4 − 2| = 2). Running total: 48.

  10. From 2; only cylinder 73 remains (|2 − 73| = 71). Running total: 48 + 71 = 119.

Total head movement across all ten requests is 119 cylinders; at 1 ms per cylinder moved, the total time to satisfy every request is 119 msec.

Independent check: grouping the ten jump distances as (13+17+1+4+5) + (3+1+2+2+71) = 40 + 79 = 119 confirms the running total above, and every cylinder in the original request list — 4, 37, 10, 7, 19, 73, 2, 15, 6, 20 — is visited exactly once, so no request is missed or repeated.

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

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…