CS FundamentalsHardGATE CS · Amazon/Microsoft SDE MCQ
Disk cylinders 0–199; the head is at 120 moving toward 199; requests: 10, 22, 20, 2, 40, 6, 38. Counting the return jump as head movement, what is the total head movement under SSTF and under C-LOOK?
- A. 118 and 156
- B. 118 and 118
- C. 156 and 118
- D. 276 and 156
Correct answer: A. 118 and 156
SSTF visits 40, 38, 22, 20, 10, 6, 2: 80 + 2 + 16 + 2 + 10 + 4 + 4 = 118. C-LOOK, moving up, finds nothing above 120, so it jumps to 2 (118) and sweeps up to 40 (38): 156.
More Operating Systems questions
- Which property of a journaling file system's ordered mode is correct?
- A process's address space uses three-level paging with 9 bits per level and 4 KB pages (8-byte entries, so each table is one 4 KB page)…
- A CPU-bound process and an I/O-bound process share a single CPU under a multilevel feedback queue with priority boosting. What is the…
- Two processes each need two printers, and the system has exactly 3 printers; each requests its printers one at a time and holds them until…
- A file system uses 4 KB blocks. A file of 10,001 bytes is stored. How much space is lost to internal fragmentation in its last block?
- Statement 1: A context switch between two threads of the same process need not flush the TLB. Statement 2: A context switch between two…