If the disk head is located initially at 32, find the number of disk moves…

2012

If the disk head is located initially at 32, find the number of disk moves required with FCFS if the disk queue of I/O blocks requests are 98, 37, 14, 124, 65, 67.

Answer: C. 321Concept: First-Come-First-Served (FCFS) disk scheduling serves every pending request strictly in the order it arrived in the queue; the scheduler never…

  1. A.

    239

  2. B.

    310

  3. C.

    321

  4. D.

    325

Attempted by 37 students.

Show answer & explanation

Correct answer: C

Concept: First-Come-First-Served (FCFS) disk scheduling serves every pending request strictly in the order it arrived in the queue; the scheduler never reorders requests to shorten a seek. Total head movement is therefore fixed by that arrival order alone, and equals the sum of the absolute differences between each pair of consecutively visited cylinders, measured from the head's starting cylinder: total = the sum of |next cylinder - current cylinder| over every service.

Application: The head starts at cylinder 32 and, under FCFS, visits 98, 37, 14, 124, 65 and 67 in exactly that order. Each seek length is the absolute difference between the two cylinders:

  1. 32 to 98: |98 - 32| = 66 cylinders

  2. 98 to 37: |37 - 98| = 61 cylinders

  3. 37 to 14: |14 - 37| = 23 cylinders

  4. 14 to 124: |124 - 14| = 110 cylinders

  5. 124 to 65: |65 - 124| = 59 cylinders

  6. 65 to 67: |67 - 65| = 2 cylinders

Adding the six seeks: 66 + 61 + 23 + 110 + 59 + 2 = 321 cylinders.

Cross-check: Re-adding the seeks as a running total gives 66, 127, 150, 260, 319 and finally 321, which confirms the arithmetic. It is worth contrasting the cost: SSTF on the same queue would visit 32, 37, 14, 65, 67, 98, 124 for 5 + 23 + 51 + 2 + 31 + 26 = 138 cylinders. Because FCFS ignores locality entirely, the single 14 to 124 swing of 110 cylinders alone costs almost as much as the whole seek-optimised schedule.

Total head movement under FCFS = 321 cylinders.

Explore the full course: Mppsc Assistant Professor Computer Science Paper 2

Loading lesson…