- Asked 3/13
- 2073 Magh · 6 marks
Disk scheduling: FCFS, SSF, SCAN at 53
Short answer
For head at 53 and queue 98,183,37,122,14,124,65,67, FCFS serves arrival order and moves 640 cylinders. SSTF order 53,65,67,37,14,98,122,124,183 moves 236; SCAN moving toward 0 first also moves 236 cylinders.
Suppose a disk drive with 200 cylinders numbered from 0 to 199. The drive is currently serving a request at 53. The queue of pending request is 98, 183, 37, 122, 14, 124, 65, 67. Starting from the current head position, calculate total head movement (in cylinder) that the disk arm moves to satisfy all the pending request for FCFS, SSF and SCAN disk scheduling algorithm.
Disk has 200 cylinders (0–199), head at 53, queue = 98, 183, 37, 122, 14, 124, 65, 67. Total head movement = sum of absolute differences between successive positions.
1. FCFS
Requests are served in arrival order.
53 → 98 → 183 → 37 → 122 → 14 → 124 → 65 → 67
| Move | Distance |
|---|---|
| 53 → 98 | 45 |
| 98 → 183 | 85 |
| 183 → 37 | 146 |
| 37 → 122 | 85 |
| 122 → 14 | 108 |
| 14 → 124 | 110 |
| 124 → 65 | 59 |
| 65 → 67 | 2 |
| Total | 640 |
2. SSF (Shortest Seek First / SSTF)
Always go to the nearest pending request.
53 → 65 → 67 → 37 → 14 → 98 → 122 → 124 → 183
| Move | Distance |
|---|---|
| 53 → 65 | 12 |
| 65 → 67 | 2 |
| 67 → 37 | 30 |
| 37 → 14 | 23 |
| 14 → 98 | 84 |
| 98 → 122 | 24 |
| 122 → 124 | 2 |
| 124 → 183 | 59 |
| Total | 236 |
3. SCAN (elevator)
Direction is not given, so assume the arm moves towards cylinder 0 first (as in Silberschatz), serves requests on the way, reverses at cylinder 0 and then moves up.
53 → 37 → 14 → 0 → 65 → 67 → 98 → 122 → 124 → 183
| Move | Distance |
|---|---|
| 53 → 37 | 16 |
| 37 → 14 | 23 |
| 14 → 0 | 14 |
| 0 → 65 | 65 |
| 65 → 67 | 2 |
| 67 → 98 | 31 |
| 98 → 122 | 24 |
| 122 → 124 | 2 |
| 124 → 183 | 59 |
| Total | 236 |
If the head instead moved towards 199 first, SCAN would give 53 → 65 → 67 → 98 → 122 → 124 → 183 → 199 → 37 → 14 = 331 cylinders.
Summary
| Algorithm | Total head movement |
|---|---|
| FCFS | 640 |
| SSF (SSTF) | 236 |
| SCAN (towards 0 first) | 236 |
Answer: FCFS = 640, SSF = 236, SCAN = 236 cylinders.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Disk scheduling with 150 cylinders · Operating System, chapter 6 · asked 2×
- Device driver; FCFS, SSF, SCAN numerical · Operating System, chapter 6 · asked 2×
- Disk scheduling: FCFS, SSTF, SCAN, LOOK, C-SCAN · Operating System, chapter 6
- Disk scheduling with 5000 cylinders · Operating System, chapter 6 · asked 2×
- Disk scheduling with 100 cylinders · Operating System, chapter 6 · asked 2×
- Disk scheduling with 50 cylinders · Operating System, chapter 6
- Disk scheduling, 1000 cylinders, head at 345 · Operating System, chapter 6