CS FundamentalsHardWipro · Cognizant technical pattern
Reference string: 5, 2, 5, 8, 2, 3, 5, 9, 8, 2, 3, 5. With 3 frames, initially empty, how many page faults does LRU replacement cause?
- A. 10
- B. 9
- C. 7
- D. 8
Correct answer: A. 10
Hits occur only at the 3rd reference (5) and 5th (2); after that each page returns just after being the least recently used: faults at 5, 2, 8, 3, 5, 9, 8, 2, 3, 5 = 10. Optimal would need 7.
More Operating Systems questions
- Reference string: 1, 3, 0, 3, 5, 6, 3, 1, 0, 6, 5, 3. With 3 frames, initially empty, how many page faults does the Optimal (Belady’s MIN)…
- 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…
- 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…