GateAI
Memory Management and Virtual Memory

GATE CSE 2014 Set 3 · Q20

NAT1 markMedium

Time

A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 6

Memory Management and Virtual Memory

We trace the LRU replacement algorithm with 3 page frames initialized to empty:

  1. Reference 4: Page fault →\rightarrow Frames: [4] (Fault 1)

  2. Reference 7: Page fault →\rightarrow Frames: [4, 7] (Fault 2)

  3. Reference 6: Page fault →\rightarrow Frames: [4, 7, 6] (Fault 3)

  4. Reference 1: Page fault. The least recently used page is 4. Replace 4 with 1 →\rightarrow Frames: [1, 7, 6] (Fault 4)

  5. Reference 7: Hit →\rightarrow Recency order (MRU to LRU): 7, 1, 6

  6. Reference 6: Hit →\rightarrow Recency order (MRU to LRU): 6, 7, 1

  7. Reference 1: Hit →\rightarrow Recency order (MRU to LRU): 1, 6, 7

  8. Reference 2: Page fault. The least recently used page is 7. Replace 7 with 2 →\rightarrow Frames: [1, 6, 2] (Fault 5). Recency order: 2, 1, 6

  9. Reference 7: Page fault. The least recently used page is 6. Replace 6 with 7 →\rightarrow Frames: [1, 2, 7] (Fault 6). Recency order: 7, 2, 1

  10. Reference 2: Hit →\rightarrow Recency order: 2, 7, 1

Total number of page faults = 6.

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 Q20 of the GATE CSE 2014 Set 3 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. 2 of them are 1-mark NAT questions like this one, and GATE CSE 2014 Set 3 has 2.

How GATE tests Memory Management and Virtual Memory

More from GATE CSE 2014 Set 3

Share this solution

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

GateAI solution cardGATE CSE 2014 Set 3 · Q20 · NAT

A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2

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.