CS FundamentalsHardGATE CS (PYQ pattern)
The disk has cylinders 0 to 199. The head is at 100, moving towards higher cylinders. Pending requests: 23, 89, 132, 42, 187, 70, 12. SCAN goes to the last cylinder 199, reverses and serves the lower requests; C-SCAN goes to 199, jumps back to cylinder 0 (the jump counts as head movement) and then moves upward. What is the total head movement of C-SCAN minus that of SCAN?
- A. 387
- B. 286
- C. 101
- D. 189
Correct answer: C. 101
SCAN = (199 - 100) + (199 - 12) = 286; C-SCAN = (199 - 100) + 199 + 89 = 387 (after the jump it must climb to the highest low-side request, 89). Difference = 101.
More Operating Systems questions
- With 3 frames (initially empty) the reference string is 2, 5, 3, 6, 2, 5, 4, 2, 4, 2, 1, 2, 5, 6, 6, 1, 2, 3, 6, 3, 4, 4. The clock…
- A file of 100,000 bytes is stored on a disk with 512-byte blocks. Under linked allocation each block holds a 4-byte next-pointer and 508…
- A 2^40-byte disk uses 4 KB blocks. Free space can be tracked either by a bitmap (1 bit per block) or by a plain list of free block…
- A 10,000 RPM disk has an average seek time of 5 ms and a sustained transfer rate of 100 MB/s (1 MB = 10^6 bytes). It serves a stream of…
- A one-slot buffer uses semaphores mutex = 1, empty = 1, full = 0. The producer runs twice: wait(mutex); wait(empty); print p…
- Five processes with CPU bursts 5, 12, 3, 9 and 7 ms all arrive at time 0 in that order. Context switches are free. Among the quanta 2, 4…