Question:

Consider a demand paging system with three frames, and the following page reference string: \[ 1\ 2\ 3\ 4\ 5\ 4\ 1\ 6\ 4\ 5\ 1\ 3\ 2. \] The contents of the frames are as follows initially and after each reference (from left to right): 

The *-marked references cause page replacements. Which one or more of the following could be the page replacement policy/policies in use?

Show Hint

To determine the {Optimal Page Replacement Policy}, always replace the page that will not be needed for the longest time in the future. This minimizes page faults.
Updated On: Apr 7, 2025
  • {Least Recently Used page replacement policy}
  • {Least Frequently Used page replacement policy}
  • {Most Frequently Used page replacement policy}
  • {Optimal page replacement policy}
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

The Optimal Page Replacement Policy (OPT) replaces the page that will not be used for the longest time in the future. By analyzing the given reference string and the resulting page replacements, we observe that the page replacements align with the optimal strategy, providing the best possible performance in terms of minimizing page faults.
  • Least Recently Used (LRU) considers the least recently used page, which may not always align with the observed page replacements. LRU focuses on the recent history of page accesses, but it may not always predict future accesses correctly, leading to suboptimal decisions.
  • Least Frequently Used (LFU) and Most Frequently Used (MFU) are based on frequency counts, focusing on how often pages are accessed. However, these strategies are not evident from the given sequence, as the reference string does not provide enough information to make frequency-based decisions.

Thus, the correct answer is (D) Optimal Page Replacement Policy, as it most accurately reflects the page replacement strategy demonstrated in the sequence.

Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions