CS FundamentalsHardProduct company interview · GATE level
Reference string: 6, 3, 1, 0, 3, 6, 1, 0, 6, 3, 1, 6. With 3 frames, initially empty, how many page faults do FIFO, LRU and Optimal (Belady's MIN) replacement cause, respectively?
- A. FIFO 8, LRU 9, Optimal 6
- B. FIFO 7, LRU 10, Optimal 6
- C. FIFO 7, LRU 9, Optimal 7
- D. FIFO 7, LRU 9, Optimal 6
Correct answer: D. FIFO 7, LRU 9, Optimal 6
Simulating each policy frame-by-frame on this string with 3 frames gives FIFO 7 faults, LRU 9 faults and Optimal 6 faults; Optimal is always the lower bound since it evicts the page used farthest in the future.
More Operating Systems questions
- Reference string: 6, 3, 1, 0, 3, 6, 1, 0, 6, 3, 1, 6. With 4 frames, initially empty, how many page faults does LRU replacement cause?
- Reference string: 5, 1, 2, 6, 1, 5, 2, 6, 5, 1, 2, 6, 5. With 4 frames, initially empty, how many page faults do FIFO, LRU and Optimal…
- Reference string: 5, 0, 3, 8, 1, 6, 2, 9, 4, 7, 0, 3, 8. With 4 frames, initially empty, how many page faults do FIFO, LRU and Optimal…
- Reference string: 5, 0, 3, 8, 1, 6, 2, 9, 4, 7, 0, 3, 8. With 3 frames, initially empty, how many page faults does FIFO replacement cause?
- A disk has cylinders 0–199 and the head is at cylinder 53. Pending requests: 98, 183, 37, 122, 14, 124, 65, 67. What is the total head…
- A disk has cylinders 0–199 and the head is at cylinder 53, moving towards cylinder 199. Pending requests: 98, 183, 37, 122, 14, 124, 65…