Skip to content
GATEiit

GATE CSE 2025 Session 2 Q47: Identify the page replacement policy from a frame trace

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):

initially1*2*3*4*5*416*451*3*2*
Frame 1-1111111666662
Frame 2--224444444111
Frame 3---33555555533

The *-marked references cause page replacements.

Which one or more of the following could be the page replacement policy/policies in use?

Try it: multiple select: one or more correct options

Select one or more options
Select all correct options. No negative marking, no partial marks.
Show answer and explanation

Answer: D (official GATE 2025 final answer key)

Concept used: Check each policy at every replacement: which victim would it choose?

First step: At the reference to 4, frames hold 1, 2, 3 and page 2 is evicted; LRU would evict 1, while page 2 is the one used farthest in the future.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2025 Session 2 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key