CS FundamentalsHardProduct-company interview pattern
A disk has cylinders 0–199 and the head is at cylinder 100. Pending requests: 45, 130, 12, 180, 90, 150, 60. What is the total head movement under SSTF?
- A. 280
- B. 348
- C. 256
- D. 246
Correct answer: C. 256
From 100 the nearest is 90 (10), then 60 (30), 45 (15), 12 (33); now 130 is nearest (118), then 150 (20), 180 (30). Total 256. 280 is SCAN towards 0, which travels all the way to cylinder 0 before reversing.
More Operating Systems questions
- Three processes share a single resource type with identical instances. Their maximum needs are 3, 4 and 5 instances. What is the minimum…
- Which of the following is NOT a requirement for a correct solution to the critical-section problem?
- Under Highest Response Ratio Next (non-preemptive), the CPU becomes free at time 9. Ready processes (arrival, burst): P2 (2, 3), P3 (4…
- Reference string: 6, 1, 6, 2, 0, 1, 6, 4, 2, 1, 0, 4, 6. With 3 frames, initially empty, which set of page-fault counts is correct for…
- 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…
- 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…