- LPU MCA Semester 1
- CAP366
- Unit 8
CAP366 · Unit 8: Protection and disk management
Disk structure and disk scheduling (FCFS, SSTF, SCAN, C-SCAN)
10 practice questions · in the ETE syllabus
Key points
- Access time = seek + rotational latency + transfer
- SSTF can cause starvation
- SCAN goes to the disk end; LOOK stops at the last request
- C-SCAN gives more uniform waiting
A disk consists of platters with tracks; the same track on all platters forms a cylinder. Access time = seek time (moving the head to the cylinder) + rotational latency (waiting for the sector to rotate under the head) + transfer time. Scheduling mainly reduces seek time.
| Policy | Rule | Notes |
|---|---|---|
| FCFS | Serve in arrival order | Fair but long movement |
| SSTF | Nearest cylinder first | Can starve far requests |
| SCAN | Sweep to one end, then reverse | Elevator algorithm |
| C-SCAN | Sweep one way, jump back to start | More uniform waits |
| LOOK / C-LOOK | Turn at the last request, not the disk end | Less movement |
Worked example: head at 53, queue 98, 183, 37, 122, 14, 124, 65, 67, cylinders 0-199: FCFS travels 640 cylinders, SSTF 236 (order 65, 67, 37, 14, 98, 122, 124, 183), SCAN going toward 0 first also 236, C-SCAN going up and counting the return jump 382, and LOOK going up 299.
Exam trap: state whether the return trip of C-SCAN is counted; and SCAN goes to the physical end of the disk, whereas LOOK stops at the last request.
Try two questions
How does C-SCAN differ from SCAN?
- It returns from one end to the start without serving requests, giving more uniform waits
- It serves requests while sweeping in both directions, giving equal waits to every cylinder
- It always serves the nearest pending request first, wherever the head is
- It reverses direction at the last request in the queue, not at the disk end
Show the answer
A. C-SCAN treats the cylinders as circular, serving in one direction only.
Why not B: Serving in both directions is SCAN.
Why not C: That is SSTF.
Why not D: That is the LOOK variant.
With the same queue (head at 53; 98, 183, 37, 122, 14, 124, 65, 67; cylinders 0 to 199), SCAN, initially moving toward cylinder 0 and going to the end, travels how many cylinders?
- 183 cylinders
- 331 cylinders
- 299 cylinders
- 236 cylinders
Show the answer
D. The head goes 53 down to 0 (53) and then up to 183 (183), giving 236.
Why not A: 183 is the distance from 0 to the farthest request only.
Why not B: 331 is SCAN moving up first.
Why not C: 299 is LOOK moving up first.