- Year not given
Disk scheduling algorithms with numerical
Short answer
Disk scheduling orders pending requests to minimize seek time. For given head 53 moving to 0, queue 98,183,37,122,14,124,65,67: total head movements FCFS 640, SSTF 236, SCAN 236, LOOK 208, C-SCAN 386, C-LOOK 326 cylinders.
What is disk scheduling? Explain the disk scheduling algorithms with numerical.
Disk scheduling is the method the operating system uses to decide the order in which pending disk I/O requests are served. Its aim is to reduce the total seek time (arm movement), since seek time dominates disk access time (seek + rotational latency + transfer time), and so to improve throughput and fairness.
Algorithms
- FCFS: serve requests in arrival order. Fair and simple, but the arm may swing wildly across the disk.
- SSTF: serve the request nearest to the head. Low seek time, but far-away requests may starve.
- SCAN (elevator): the arm moves in one direction serving requests, reaches the end of the disk, reverses and serves requests on the way back. No starvation.
- C-SCAN: serve requests in one direction only; on reaching the end, return to the other end without serving, then sweep again. Gives a more uniform waiting time.
- LOOK / C-LOOK: like SCAN / C-SCAN, but the arm goes only as far as the last request in each direction.
Numerical
Disk has cylinders 0–199, head at 53 and moving towards 0, queue = 98, 183, 37, 122, 14, 124, 65, 67.
FCFS: 53 → 98 → 183 → 37 → 122 → 14 → 124 → 65 → 67 45 + 85 + 146 + 85 + 108 + 110 + 59 + 2 = 640
SSTF: 53 → 65 → 67 → 37 → 14 → 98 → 122 → 124 → 183 12 + 2 + 30 + 23 + 84 + 24 + 2 + 59 = 236
SCAN: 53 → 37 → 14 → 0 → 65 → 67 → 98 → 122 → 124 → 183 16 + 23 + 14 + 65 + 2 + 31 + 24 + 2 + 59 = 236
LOOK: 53 → 37 → 14 → 65 → 67 → 98 → 122 → 124 → 183 16 + 23 + 51 + 2 + 31 + 24 + 2 + 59 = 208
C-SCAN: 53 → 37 → 14 → 0 → 199 → 183 → 124 → 122 → 98 → 67 → 65 16 + 23 + 14 + 199 + 16 + 59 + 2 + 24 + 31 + 2 = 386 (return jump 0 → 199 counted)
C-LOOK: 53 → 37 → 14 → 183 → 124 → 122 → 98 → 67 → 65 16 + 23 + 169 + 59 + 2 + 24 + 31 + 2 = 326 (return jump 14 → 183 counted)
| Algorithm | Total head movement |
|---|---|
| FCFS | 640 |
| SSTF | 236 |
| SCAN | 236 |
| LOOK | 208 |
| C-SCAN | 386 |
| C-LOOK | 326 |
Answer: FCFS has the most movement (640) and LOOK the least (208). SSTF and SCAN both give 236. Under heavy load, SCAN/C-SCAN are preferred because they avoid starvation.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Scheduling algorithms with numerical · Operating System, chapter 2
- Disk scheduling with 100 cylinders · Operating System, chapter 6 · asked 2×
- Disk scheduling, 1000 cylinders, head at 345 · Operating System, chapter 6
- Disk scheduling: FCFS, SSTF, SCAN, LOOK, C-SCAN · Operating System, chapter 6
- Scheduling algorithms in interactive systems · Operating System, chapter 2
- Disk scheduling: FCFS, SSF, SCAN at 53 · Operating System, chapter 6 · asked 3×
- Preemptive priority scheduling (4, 10, 5 ms) · Embedded System, chapter 6 · asked 2×
- Priority and SJF scheduling with P4 and P5 · Embedded System, chapter 6 · asked 2×
- Round robin scheduling (5, 8, 7 ms, q=2) · Embedded System, chapter 6