Engineering End Semester Examination
– Valuation Answer Key
Subject: Operating Systems
Question Type: 16 Marks
Question: Explain in detail about the different disk scheduling algorithms with its
examples.
1. Introduction to Disk Scheduling (2 Marks)
Disk scheduling is the process by which the operating system decides the order in which
I/O requests are to be served. Efficient scheduling improves overall system performance
and reduces seek time.
2. Disk Scheduling Algorithms (12 Marks)
i. First-Come, First-Served (FCFS) (2 Marks)
- Requests are processed in the order they arrive.
- Simple but may result in long wait times.
Example: Request queue = [98, 183, 37, 122, 14, 124, 65, 67], Head at 53
Seek sequence: 53 → 98 → 183 → 37 → 122 → 14 → 124 → 65 → 67
Total head movement = 640 cylinders
ii. Shortest Seek Time First (SSTF) (2 Marks)
- Selects the request closest to the current head position.
- Reduces average seek time.
Example (same queue, head at 53):
Seek sequence: 53 → 65 → 67 → 37 → 14 → 98 → 122 → 124 → 183
Total head movement = 236 cylinders
iii. SCAN (Elevator Algorithm) (2 Marks)
- Head moves in one direction servicing all requests, then reverses.
- Services requests in both directions.
Seek sequence: 53 → 65 → 67 → 98 → 122 → 124 → 183 → 199 (end) → 37 → 14
Total head movement = 382 cylinders
iv. LOOK (2 Marks)
- Similar to SCAN, but head reverses at the last request instead of the disk end.
Seek sequence: 53 → 65 → 67 → 98 → 122 → 124 → 183 → then reverse → 37 → 14
Total head movement = 322 cylinders
v. Circular SCAN (C-SCAN) (2 Marks)
- Head moves in one direction servicing requests, jumps to the start after reaching the
end.
Seek sequence: 53 → 65 → 67 → 98 → 122 → 124 → 183 → 199 → jump to 0 → 14 →
37
Total head movement = 391 cylinders
vi. Circular LOOK (C-LOOK) (2 Marks)
- Like C-SCAN but head moves only to last request, then jumps to lowest.
Seek sequence: 53 → 65 → 67 → 98 → 122 → 124 → 183 → jump to 14 → 37
Total head movement = 322 cylinders
3. Conclusion (2 Marks)
Disk scheduling plays a vital role in optimizing the performance of I/O operations.
Among all algorithms, SSTF, SCAN, and LOOK offer better performance than FCFS
depending on system workload.