- 2074 Bhadra · 10 marks
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
| Algorithm | Head moving down first | Head moving up first |
|---|---|---|
| FCFS | 135 | 135 |
| SSTF | 47 | 47 |
| SCAN | 55 | 79 |
| LOOK | 47 | 61 |
| C-SCAN | 78 | 97 |
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)
Related questions
- Disk scheduling with 100 cylinders · Operating System, chapter 6 · asked 2×
- Disk scheduling with 5000 cylinders · Operating System, chapter 6 · asked 2×
- Disk scheduling with 150 cylinders · Operating System, chapter 6 · asked 2×
- Disk scheduling: FCFS, SSF, SCAN at 53 · Operating System, chapter 6 · asked 3×
- Disk scheduling, 1000 cylinders, head at 345 · Operating System, chapter 6
- Disk scheduling: FCFS, SSTF, SCAN, LOOK, C-SCAN · Operating System, chapter 6