Skip to content
Official PYQ · 2015

GATE CS 2015 Set 1 Q47 — Memory Management and Virtual Memory

Explain with AI

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\text{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)?

Choose one option
View worked solution

Answer: A

To find the correct option, we trace the given page reference sequence with 5 page frames for both FIFO and LRU replacement policies.

Reference string: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3

1. First In First Out (FIFO)

FIFO replaces the page that has been in memory the longest.

Ref382391638936213
F1333333666666666
F288888833333333
F32222228888888
F499999999222
F51111111111
FaultFFFHFFFFFHHHFHH

Total FIFO Page Faults = 9

2. Least Recently Used (LRU)

LRU replaces the page that has not been used for the longest period of time.

Ref382391638936213
F1333333333333333
F288888666666611
F32222228888888
F499999999222
F51111111111
FaultFFFHFFFHFHHHFFH

Total LRU Page Faults = 9

Both FIFO and LRU algorithms incur exactly 9 page faults for the given reference string.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Memory Management and Virtual Memory questions