Skip to main content

GATE CSE 2014Operating System › Memory Management & Virtual MemoryVerified

GATE CSE 2014 PYQ: A computer has twenty physical page frames which contain pages numbered 101 101 101 through 120 120 120 .…

A computer has twenty physical page frames which contain pages numbered 101 through 120. Now a program accesses the pages numbered 1, 2, ..., 100\text{1, 2, ..., 100} in that order, and repeats the access sequence THRICE. Which one of the following page replacement policies experiences the same number of page faults as the optimal page replacement policy for this program?

  1. A
    Least-recently-used
  2. B
    First-in-first-out
  3. C
    Last-in-first-out
  4. D
    Most-recently-used
    Correct answer

Answer

(D) Most-recently-used

Approach

Simulate optimal page replacement symbolically on the cyclic reference string and identify which practical policy makes the same eviction choices.

The reference string is cyclic, so the page most recently used is also the page whose next use is farthest away. Therefore optimal page replacement coincides with MRU, making D the correct choice.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.