CS FundamentalsVery hardGATE CS (PYQ pattern)
A disk has cylinders 0 to 199. The head is at cylinder 60 moving upward. Pending requests: 18, 150, 72, 41, 177, 95, 33, 124. C-LOOK serves the requests above the head in increasing order, then jumps (the jump counts as head movement) to the lowest pending request and continues upward. What is the total head movement?
- A. 276
- B. 140
- C. 379
- D. 299
Correct answer: D. 299
60 to 177 = 117, jump 177 to 18 = 159, then 18 to 41 = 23: total 299. 276 is what SSTF or LOOK gives; 140 forgets the jump; 379 is C-SCAN (to 199, back to 0, up to 41).
More Operating Systems questions
- FIFO page replacement is run on the reference string 3, 4, 2, 6, 1, 3, 4, 6, 7, 1, 1, 5, 3, 4, 7, 2, 1, 7 with an initially empty memory…
- The clock (second-chance) algorithm manages 4 frames, initially empty and filled in order 0..3. A page's reference bit is set to 1 when it…
- Assume every fork() succeeds and each printf output is flushed immediately. int main(void) { for (int i = 0; i < 4; i++) { if (fork() ==…
- A Unix-style file system has 1 KB blocks, 4-byte block pointers and inodes with 12 direct, one single-indirect and one double-indirect…
- Holes in memory (in KB, in address order): 250, 240, 230, 180, 140. Processes arrive and stay resident in this order: 100, 190, 200, 150…
- A disk delivers 20 MB/s (1 MB = 10^6 bytes) to memory by DMA, 4 bytes per bus cycle. Each word transfer steals one 40 ns memory cycle from…