CS FundamentalsVery hardGATE CS (PYQ pattern)

Page-fault-frequency control with threshold T = 3: on a fault at time t, if more than 3 time units passed since the previous fault, all resident pages NOT referenced since the previous fault are removed, then the faulting page is added; otherwise the faulting page is simply added. Memory is initially empty, the previous-fault time starts at 0, and hits mark a page referenced. References at times 1 to 22: 1, 2, 3, 1, 2, 3, 4, 4, 4, 4, 4, 5, 5, 5, 1, 6, 6, 6, 6, 6, 6, 2. What is the resident-set size after the last reference, and the maximum size reached?

  1. A. final 3, maximum 4
  2. B. final 2, maximum 4
  3. C. final 2, maximum 5
  4. D. final 1, maximum 4

Correct answer: B. final 2, maximum 4

Applying the rule at each fault gives a maximum resident set of 4 pages and a final set of 2.

More Operating Systems questions

Exams that ask this topic