Skip to main content

Disk scheduling with 50 cylinders

Short answer

For head at 15 moving down first, FCFS total movement is 135 cylinders, SSTF is 47, SCAN to 0 then up is 55, LOOK reversing at the last request is 47, and C-SCAN with return jump counted is 78.

A disk drive has 50 cylinders, numbered 0 to 49. The drive is currently serving a request at cylinder 15, and the queue of pending requests, in FIFO order is 4, 40, 11, 35, 7, 14. What is the total distance that the disk arm moves for the following algorithms: a) FCFS b) SSTF c) SCAN d) LOOK e) C-SCAN

Cylinders 0–49, head at 15, queue (FIFO) = 4, 40, 11, 35, 7, 14. The direction of head movement is not given, so assume the head is moving towards the lower cylinders (towards 0) at first. The result for the other direction is also shown.

a) FCFS

15 → 4 → 40 → 11 → 35 → 7 → 14

11 + 36 + 29 + 24 + 28 + 7 = 135

b) SSTF

15 → 14 → 11 → 7 → 4 → 35 → 40

1 + 3 + 4 + 3 + 31 + 5 = 47

c) SCAN (towards 0 first, goes to the end of the disk)

15 → 14 → 11 → 7 → 4 → 0 → 35 → 40

1 + 3 + 4 + 3 + 4 + 35 + 5 = 55

d) LOOK (reverses at the last request, not at the disk end)

15 → 14 → 11 → 7 → 4 → 35 → 40

1 + 3 + 4 + 3 + 31 + 5 = 47

e) C-SCAN (sweep down to 0, jump to 49, continue down)

15 → 14 → 11 → 7 → 4 → 0 → 49 → 40 → 35

1 + 3 + 4 + 3 + 4 + 49 + 9 + 5 = 78 (the return jump 0 → 49 is counted)

Result

AlgorithmHead moving down firstHead moving up first
FCFS135135
SSTF4747
SCAN5579
LOOK4761
C-SCAN7897

Answer (head moving down first): FCFS = 135, SSTF = 47, SCAN = 55, LOOK = 47, C-SCAN = 78 cylinders. SSTF and LOOK are the best here.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Operating System chapter 6 questions →