CS FundamentalsHardAmazon · Microsoft MCQ pattern
A disk has cylinders 0 to 199. The head is at cylinder 50 and moving towards cylinder 0. Pending requests: 182, 20, 97, 64, 160. Using LOOK (service requests in the current direction, reverse at the last request in that direction instead of running to the disk's edge), what is the total head movement?
- A. 250
- B. 192
- C. 232
- D. 212
Correct answer: B. 192
Downward first (towards 0): only 20 is below 50, so 50→20 = 30. Then reverse upward through 64, 97, 160, 182: 44+33+63+22 = 162. Total = 30 + 162 = 192 cylinders. Running all the way to cylinder 0 before reversing, as plain SCAN would, instead costs 232 (50→0 = 50, then 0→182 = 182).
More Operating Systems questions
- Which statement correctly contrasts deadlock avoidance (Banker's algorithm) with deadlock detection-and-recovery?
- A system with 3 CPU cores uses symmetric multiprocessing (SMP), where every core runs the same copy of the OS kernel and can access any…
- A real-time system has two periodic tasks: Task A with period 20 ms and execution time 5 ms, Task B with period 50 ms and execution time…
- Compare Rate Monotonic Scheduling (RMS, static priority by period) and Earliest Deadline First (EDF, dynamic priority by nearest deadline)…
- A system call interface lets a user program request a kernel service (like opening a file). What is the typical hardware-assisted…
- Copy-on-write (COW) is used after fork() to avoid copying the entire parent's address space immediately. How does it work?