StreakPeaked· Practice

ExamsGATETechnical

A computer has twenty physical page frames containing pages numbered 10 through 120. A program accesses the pages numbered 1, 2, ..., 100 in that order and repeats the access sequence three times. 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. Least-recently-used
  2. First-in-first-out
  3. Last-in-first-out
  4. Most-recently-used

Correct answer: Least-recently-used

Solution

The program scans pages 1 to 100 repeatedly, which is much larger than the 20 available frames. For this pattern, LRU behaves like the optimal policy because the least recently used page is also the least likely to be needed soon in a sequential scan. Therefore, LRU incurs the same number of page faults as OPT here.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →