- 2071 Magh · 11 marks
Disk scheduling: FCFS, SSTF, SCAN, LOOK, C-SCAN
Short answer
Head moving upward; FCFS total head movement = 640 cylinders, SSTF = 236, SCAN = 331 (to end 199 then reverse), LOOK = 299 (reverse at 183), C-SCAN = 382 (to 199, jump to 0, continue upward).
Consider a disk drive having 200 cylinders, numbered from 0 to 199. The head is currently positioned at cylinder 53 and moving toward the cylinder 60. The queue of pending requests are 98, 183, 37, 122, 14, 124, 65, 67. Starting from the current head position, what is the total head movement (in cylinders) to service the pending requests for each of the following disk arm scheduling algorithms? (a) FCFS (b) SSTF (c) SCAN (d) LOOK (e) C-SCAN.
Disk: 200 cylinders (0 to 199), head at 53 moving towards 60 (upward). Queue: 98, 183, 37, 122, 14, 124, 65, 67.
a) FCFS
FCFS: service order (head at 53): 98, 183, 37, 122, 14, 124, 65, 67
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 = 45 + 85 + 146 + 85 + 108 + 110 + 59 + 2 = 640
b) SSTF
SSTF: service order (head at 53): 65, 67, 37, 14, 98, 122, 124, 183
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 = 12 + 2 + 30 + 23 + 84 + 24 + 2 + 59 = 236
c) SCAN (up to cylinder 199, then reverse)
SCAN: service order (head at 53): 65, 67, 98, 122, 124, 183, 37, 14
53 -> 65 = 12
65 -> 67 = 2
67 -> 98 = 31
98 -> 122 = 24
122 -> 124 = 2
124 -> 183 = 59
183 -> 199 = 16
199 -> 37 = 162
37 -> 14 = 23
Total = 12 + 2 + 31 + 24 + 2 + 59 + 16 + 162 + 23 = 331
d) LOOK (up to 183, the last request, then reverse)
LOOK: service order (head at 53): 65, 67, 98, 122, 124, 183, 37, 14
53 -> 65 = 12
65 -> 67 = 2
67 -> 98 = 31
98 -> 122 = 24
122 -> 124 = 2
124 -> 183 = 59
183 -> 37 = 146
37 -> 14 = 23
Total = 12 + 2 + 31 + 24 + 2 + 59 + 146 + 23 = 299
e) C-SCAN (up to 199, jump to 0, continue upward)
C-SCAN: service order (head at 53): 65, 67, 98, 122, 124, 183, 14, 37
53 -> 65 = 12
65 -> 67 = 2
67 -> 98 = 31
98 -> 122 = 24
122 -> 124 = 2
124 -> 183 = 59
183 -> 199 = 16
199 -> 0 = 199 (return jump)
0 -> 14 = 14
14 -> 37 = 23
Total = 12 + 2 + 31 + 24 + 2 + 59 + 16 + 199 + 14 + 23 = 382
Summary
| Algorithm | Total head movement (cylinders) |
|---|---|
| FCFS | 640 |
| SSTF | 236 |
| SCAN | 331 |
| LOOK | 299 |
| C-SCAN | 382 (183 if the return sweep is not counted) |
Answer: FCFS 640, SSTF 236, SCAN 331, LOOK 299, C-SCAN 382 cylinders.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Disk scheduling: FCFS, SSF, SCAN at 53 · Operating System, chapter 6 · asked 3×
- Disk scheduling with 5000 cylinders · Operating System, chapter 6 · asked 2×
- Disk scheduling with 150 cylinders · Operating System, chapter 6 · asked 2×
- Disk scheduling with 50 cylinders · Operating System, chapter 6
- Device driver; FCFS, SSF, SCAN numerical · Operating System, chapter 6 · asked 2×
- Disk scheduling with 100 cylinders · Operating System, chapter 6 · asked 2×