CS FundamentalsHardProduct-company MCQ pattern

Reference string: 3, 1, 4, 3, 2, 1, 5, 3, 4, 1, 2, 5, 4, 3 frames, initially empty. Which statement is correct?

  1. A. FIFO and LRU both give 11 faults
  2. B. LRU gives 12 faults and OPT gives 9
  3. C. FIFO gives 11 faults and LRU gives 12, so LRU is worse here
  4. D. LRU gives fewer faults than FIFO, as it always does

Correct answer: C. FIFO gives 11 faults and LRU gives 12, so LRU is worse here

FIFO: 11 faults (hits on the 4th and 6th references). LRU: only the 4th reference (3) hits, so 12 faults. OPT gives 7. LRU is usually better than FIFO but not on every string, which is the trap.

More Operating Systems questions

Exams that ask this topic