CS FundamentalsVery hardGATE CS

Reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. With 4 frames (initially empty), how many page faults does the Optimal algorithm produce?

  1. A. 10
  2. B. 14
  3. C. 8
  4. D. 11

Correct answer: C. 8

OPT replaces the page whose next use is farthest in the future (or never). With 4 frames it gives 8 faults, versus LRU 10 and FIFO 14; with 3 frames OPT gives 11.

More Operating Systems questions

Exams that ask this topic