GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 1.23

Optimal replacement victim

Operating Systems · Virtual Memory & Paging · Full GATE CSE 2002 paper

GATE 2002, Q1.23 1 mark · MCQ
Report issue

Virtual Memory & Paging

Question 1.23, GATE 2002: Which page does optimal page replacement evict?
(A) The one unused for the longest past interval.
(B) The one whose next use is farthest in the future.
(C) The one used the fewest times.
(D) The one used the most times.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: Compare future reuse times.

Step 2: If resident pages will next be requested after 2,5 and 10 accesses, evict the page needed after 10. Evicting the page needed after 2 causes a miss sooner while retaining a page that is not yet useful. This exchange argument can be repeated to match an optimal schedule. The method is a theoretical benchmark because the future reference string is generally unavailable online.

Conclusion: Choose the resident page whose next use lies farthest in the future, treating no further use as infinity. Exchanging any earlier-needed victim for this one cannot increase future faults, yielding Belady’s optimal policy, B. Past recency describes LRU instead.

Original paper, page 3