GATE - 2015 | OS | Consider a main memory with five page frames and the following sequence

GATE - 2015 | OS | Consider a main memory with five page frames and the following sequence
Posted on 10-02-2022

GATE - 2015 [Operating System]

Question:

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

A

Both incur the same number of page faults

B

FIFO incurs 2 more page faults than LRU

C

LRU incurs 2 more page faults than FIFO

D

FIFO incurs 1 more page faults than LRU

     

Solution:

Option (A) is Correct.

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


∴ Number of page faults = 9

 

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

∴ Number of page faults = 9

Thank You