Consider the input/output requests made at different instants of time directed…

2013

Consider the input/output requests made at different instants of time directed at a hypothetical disk having 200 tracks as given in the following table

Serial No 1 2 3 4 5
Track No 12 85 40 100 75
Time of arrival 65 80 110 100 175

Assume that

Current head position is at track no. 65
Direction of last movement is towards higher numbered tracks
Current clock time is 160 milliseconds
Head movement time per track is 1 millisecond

LOOK is a variant of SCAN disk arm scheduling algorithm. In this algorithm, if no more I/O requests are left in current direction, the disk head reverses its direction

The seek times in Shortest Seek First and LOOK disk arm scheduling algorithms respectively are

  1. A.

    144 and 123 milliseconds

  2. B.

    143 and 123 milliseconds

  3. C.

    149 and 124 milliseconds

  4. D.

    256 and 186 milliseconds

  5. E.

    None

Attempted by 38 students.

Show answer & explanation

Correct answer: B

Key observations:

  • At 160 ms, the arrived requests are for tracks 12, 85, 40, 100.

  • Track 75 arrives at 175 ms, so it is not available at the first SSTF decision.

  • For LOOK, the head is already moving upward and crosses track 75 at 170 ms, before that request arrives.

SSTF calculation:

  • Order: 65 -> 85 -> 75 -> 100 -> 40 -> 12

  • 65 -> 85 = 20; time becomes 180 ms, so track 75 has arrived.

  • 85 -> 75 = 10

  • 75 -> 100 = 25

  • 100 -> 40 = 60

  • 40 -> 12 = 28

  • Total SSTF seek time = 20 + 10 + 25 + 60 + 28 = 143 ms

LOOK calculation:

  • The head continues upward first, so the service order is 65 -> 85 -> 100 -> 75 -> 40 -> 12.

  • Total LOOK seek time = (85 - 65) + (100 - 85) + (100 - 75) + (75 - 40) + (40 - 12)

  • = 20 + 15 + 25 + 35 + 28 = 123 ms

Final answer: 143 ms and 123 ms, so option B is correct.

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

Explore the full course: Mppsc Assistant Professor