GateAI
Memory Management and Virtual Memory

GATE CSE 2015 Set 1 · Q47

MCQ2 marksMedium

Time

Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with respect to page replacement policies First In First Out (FIFO) and Least Recently Used (LRU)?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) Both incur the same number of page faults

Memory Management and Virtual Memory

We have 5 page frames and the reference string of length 15: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3

### 1. FIFO Simulation:

  • 3: Fault →[3]\rightarrow [3]

  • 8: Fault →[3,8]\rightarrow [3, 8]

  • 2: Fault →[3,8,2]\rightarrow [3, 8, 2]

  • 3: Hit →[3,8,2]\rightarrow [3, 8, 2]

  • 9: Fault →[3,8,2,9]\rightarrow [3, 8, 2, 9]

  • 1: Fault →[3,8,2,9,1]\rightarrow [3, 8, 2, 9, 1]

  • 6: Fault (replaces 3) →[8,2,9,1,6]\rightarrow [8, 2, 9, 1, 6]

  • 3: Fault (replaces 8) →[2,9,1,6,3]\rightarrow [2, 9, 1, 6, 3]

  • 8: Fault (replaces 2) →[9,1,6,3,8]\rightarrow [9, 1, 6, 3, 8]

  • 9: Hit →[9,1,6,3,8]\rightarrow [9, 1, 6, 3, 8]

  • 3: Hit →[9,1,6,3,8]\rightarrow [9, 1, 6, 3, 8]

  • 6: Hit →[9,1,6,3,8]\rightarrow [9, 1, 6, 3, 8]

  • 2: Fault (replaces 9) →[1,6,3,8,2]\rightarrow [1, 6, 3, 8, 2]

  • 1: Hit →[1,6,3,8,2]\rightarrow [1, 6, 3, 8, 2]

  • 3: Hit →[1,6,3,8,2]\rightarrow [1, 6, 3, 8, 2]

Total FIFO faults = 9

---

### 2. LRU Simulation:

  • 3: Fault →[3]\rightarrow [3]

  • 8: Fault →[3,8]\rightarrow [3, 8]

  • 2: Fault →[3,8,2]\rightarrow [3, 8, 2]

  • 3: Hit →[8,2,3]\rightarrow [8, 2, 3]

  • 9: Fault →[8,2,3,9]\rightarrow [8, 2, 3, 9]

  • 1: Fault →[8,2,3,9,1]\rightarrow [8, 2, 3, 9, 1]

  • 6: Fault (LRU is 8) →[2,3,9,1,6]\rightarrow [2, 3, 9, 1, 6]

  • 3: Hit →[2,9,1,6,3]\rightarrow [2, 9, 1, 6, 3]

  • 8: Fault (LRU is 2) →[9,1,6,3,8]\rightarrow [9, 1, 6, 3, 8]

  • 9: Hit →[1,6,3,8,9]\rightarrow [1, 6, 3, 8, 9]

  • 3: Hit →[1,6,8,9,3]\rightarrow [1, 6, 8, 9, 3]

  • 6: Hit →[1,8,9,3,6]\rightarrow [1, 8, 9, 3, 6]

  • 2: Fault (LRU is 1) →[8,9,3,6,2]\rightarrow [8, 9, 3, 6, 2]

  • 1: Fault (LRU is 8) →[9,3,6,2,1]\rightarrow [9, 3, 6, 2, 1]

  • 3: Hit →[9,6,2,1,3]\rightarrow [9, 6, 2, 1, 3]

Total LRU faults = 9

Both algorithms incur 9 page faults. Therefore, Both incur the same number of page faults is true.

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 Q47 of the GATE CSE 2015 Set 1 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 GATE CSE 2015 Set 1 has 2.

How GATE tests Memory Management and Virtual Memory

More from GATE CSE 2015 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2015 Set 1 · Q47 · MCQ

Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with respect to page replacement policies First In First Out (FIFO) and Least Recently Used (LRU)?

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.