Consider the virtual page reference string 1, 2, 3, 2, 4, 1, 3, 2, 4, 1

Let a computer system has main memory size of 3 page frames which are initially empty and it is running on demand paged virtual memory system. The number of page faults under LRU and FIFO page replacement policy are respectively:

This question was previously asked in
HTET PGT Official Computer Science Paper - 2017
View all HTET Papers >
  1. 9, 6
  2. 6, 3
  3. 6, 9
  4. 3 , 6

Answer (Detailed Solution Below)

Option 1 : 9, 6
Free
HTET PGT Official Computer Science Paper - 2019
4.5 K Users
60 Questions 60 Marks 60 Mins

Detailed Solution

Download Solution PDF

Concept:

LRU Page Replacement Policy:

LRU (Least recently usedpage replacement algorithm is based on the assumption that the page that has been used in the last few instructions will be referenced in the next few instructions. It replaces the page that has not been referenced for the longest time.

Explanation:

Reference string: 1, 2, 3, 2, 4, 1, 3, 2, 4, 1

Number of frames = 3

  1 1 1 1 4 4 4 2 2 2
    2 2 2 2 2 3 3 3 1
      3 3 3 1 1 1 4 4
Page Fault 1 1 1 0 1 1 1 1 1 1

Here, total page faults = 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1= 9

FIFO Page Replacement Policy:

It is based on the principle of first in first out. The page which is accessed first in the sequence is replaced first. Also, we can say that during the page fault, the page that has been in memory the longest is replaced.

Explanation:

Reference string: 1, 2, 3, 2, 4, 1, 3, 2, 4, 1

Total frames allocated are 3

  1 1 1 1 4 4 4 4 4 4
    2 2 2 2 1 1 1 1 1
      3 3 3 3 3 2 2 2
Page Fault 1 1 1 0 1 1 0 1 0 0
Here, total page faults = 1 + 1 + 1 + 0 + 1 + 0 + 1 + 0 + 0= 6
Latest HTET Updates

Last updated on Jul 12, 2025

-> HTET Exam Date is out. HTET Level 1 and 2 Exam will be conducted on 31st July 2025 and Level 3 on 30 July

-> Candidates with a bachelor's degree and B.Ed. or equivalent qualification can apply for this recruitment.

-> The validity duration of certificates pertaining to passing Haryana TET has been extended for a lifetime.

-> Enhance your exam preparation with the HTET Previous Year Papers.

More Page Replacement Policy Questions

More Virtual Memory Questions

Get Free Access Now
Hot Links: teen patti gold online teen patti master old version teen patti master official