The head of moving head disk with 200 tracks, numbered 0 to 199, has just…

2023

The head of moving head disk with 200 tracks, numbered 0 to 199, has just finished a request at track 125, and currently serving a request at track 143. The queue of requests is given in the FIFO order as 86,147,91,177,94,150,102,175,130. What will be the total number of head movements required to satisfy these requests for SCAN algorithm ?

  1. A.

    259 cylinders

  2. B.

    169 cylinders

  3. C.

    154 cylinders

  4. D.

    264 cylinders

Attempted by 135 students.

Show answer & explanation

Correct answer: B

Approach: Determine the current direction from the previous and current head positions. The head moved from 125 to 143, so it is moving toward higher-numbered tracks. With SCAN, continue in that direction, service requests in ascending order, go to the end (if necessary), then reverse and service remaining requests in descending order.

Requests greater than the current head (143), sorted ascending:

  • 147

  • 150

  • 175

  • 177

Requests less than the current head (143), sorted descending:

  • 130

  • 102

  • 94

  • 91

  • 86

Service sequence and individual movements:

  • Move from 143 to 147: 4

  • 147 to 150: 3

  • 150 to 175: 25

  • 175 to 177: 2

  • 177 to 199 (end): 22

  • 199 to 130 (reverse and service remaining): 69

  • 130 to 102: 28

  • 102 to 94: 8

  • 94 to 91: 3

  • 91 to 86: 5

Total head movement: 169 cylinders

Explore the full course: Mppsc Assistant Professor