GateAI
Memory Management and Virtual Memory

GATE CSE 2014 Set 2 · Q33

MCQ2 marksMedium

Time

A computer has twenty physical page frames which contain pages numbered 101 through 120. Now a program accesses the pages numbered 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? (A) Least-recently-used (B) First-in-first-out (C) Last-in-first-out (D) Most-recently-used

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: D) Most-recently-used

Memory Management and Virtual Memory

Consider the reference string repeating 1,2,…,1001, 2, \dots, 100 three times with N=20N = 20 frames initially holding pages 101101 through 120120.

  1. First pass (1,…,1001, \dots, 100): All policies (including Optimal) will experience 100 page faults to bring pages in.

  2. Optimal Page Replacement: When replacing a page, Optimal replaces the page that will not be used for the longest period of time. In a cyclic sequence 1,2,…,1001, 2, \dots, 100, the page accessed most recently is the one that will be needed furthest in the future (at the end of the next cycle). Hence, replacing the Most-Recently-Used (MRU) page mimics the Optimal replacement strategy for repeated cyclic access strings.

  3. Comparison:

    • Under FIFO and LRU, the oldest pages in the frames are replaced, causing every single reference to fault (300300 page faults in total).

    • Under MRU, once 19 frames are filled with the first 19 pages (1,…,191, \dots, 19), the 20th frame is repeatedly replaced with the newest page (20,21,…,10020, 21, \dots, 100). On subsequent iterations, pages 11 to 1919 are already in memory and produce hits! This achieves the minimum possible number of page faults, matching the Optimal replacement algorithm.

Therefore, Most-recently-used (MRU) is the correct option.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Memory Management and Virtual Memory previous year question is Q33 of the GATE CSE 2014 Set 2 paper. Find more GATE CSE PYQs on Memory Management and Virtual Memory in Operating Systems, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Memory Management and Virtual Memory PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Memory Management and Virtual Memory in GATE CSE

Memory Management and Virtual Memory has 32 GATE CSE PYQs across 22 papers from 2011 to 2026. 6 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2014 Set 2.

How GATE tests Memory Management and Virtual Memory

More from GATE CSE 2014 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2014 Set 2 · Q33 · MCQ

A computer has twenty physical page frames which contain pages numbered 101 through 120. Now a program accesses the pages numbered 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? (A) Least-recently-used (B) First-in-first-out (C) Last-in-first-out (D) Most-recently-used

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.