CS FundamentalsVery hardGATE CS

Reference string: 1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2. With 4 frames (initially empty), how many page faults do LRU and OPT produce?

  1. A. LRU 13, OPT 11
  2. B. LRU 14, OPT 11
  3. C. LRU 13, OPT 12
  4. D. LRU 13, OPT 13

Correct answer: A. LRU 13, OPT 11

LRU gives 13 and OPT 11; FIFO also happens to give 13 on this string. OPT can never do worse than LRU on the same string and frame count.

More Operating Systems questions

Exams that ask this topic