CS FundamentalsHardTCS NQT · Infosys interview pattern
Disk cylinders 0–199; the head is at cylinder 100 and moving towards cylinder 0. Requests: 45, 130, 12, 180, 90, 150, 60. What is the total head movement under SCAN (elevator), which goes to the end of the disk before reversing?
- A. 256
- B. 268
- C. 378
- D. 280
Correct answer: D. 280
Moving down: 100 → 90 → 60 → 45 → 12 → 0 = 100 cylinders, then up: 0 → 180 = 180. Total 280. LOOK would turn at 12 instead of 0, giving 256. 378 would be C-SCAN-style jumping that is not SCAN.
More Operating Systems questions
- Working-set window Δ = 4 references. Reference string (times 1 to 10): 1, 2, 1, 3, 4, 4, 3, 5, 1, 2. What is the working set at time 6…
- In a two-process mutual-exclusion attempt, each process sets its own flag to true and then waits while the other’s flag is true; there is…
- A system runs 4 independent processes, each spending 80% of its time waiting for I/O. Assuming waits are independent, what is the…
- Processes (arrival, burst, priority — lower number is higher priority): P1 (0, 5, 3), P2 (1, 3, 1), P3 (2, 4, 4), P4 (4, 2, 2). Under…
- int A[256][256] is stored in row-major order, and a page holds 512 ints (two rows). The process has only ONE frame for A, initially empty…
- Processes (times in ms): A (arrival 0, burst 9), B (arrival 1, burst 4), C (arrival 3, burst 6), D (arrival 5, burst 2), E (arrival 8…