CS FundamentalsHardTCS NQT · Infosys pattern

Reference string: 8, 2, 9, 2, 4, 8, 9, 4, 2, 8, 4, 9, 2. With 3 frames, initially empty, how many page faults do FIFO, LRU and Optimal (Belady's MIN) replacement cause, respectively?

  1. A. FIFO 8, LRU 10, Optimal 6
  2. B. FIFO 7, LRU 11, Optimal 6
  3. C. FIFO 7, LRU 10, Optimal 7
  4. D. FIFO 7, LRU 10, Optimal 6

Correct answer: D. FIFO 7, LRU 10, Optimal 6

Simulating each policy frame-by-frame on this string with 3 frames gives FIFO 7 faults, LRU 10 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

Exams that ask this topic