Consider the following reference string of pages made by a processor :

4, 7, 5, 7, 6, 7, 10, 4, 8, 5, 8, 6, 8, 11, 4, 9, 5, 9, 6, 9, 12, 4, 7, 5, 7

Assume that the number of page frames allocated in the main memory is four. What is the number of page faults generated using Least Recently Used (LRU) replacement technique?

This question was previously asked in
UPSC ESE (Prelims) Electronics and Telecommunication Engineering 19 Feb 2023 Official Paper
View all UPSC IES Papers >
  1. 15
  2. 17
  3. 18
  4. 16

Answer (Detailed Solution Below)

Option 3 : 18
Free
ST 1: UPSC ESE (IES) Civil - Building Materials
6.1 K Users
20 Questions 40 Marks 24 Mins

Detailed Solution

Download Solution PDF

The sequence of page references and track the page frames using the LRU replacement technique:

Reference string: 4,7,5,7,6,7,10,4,8,5,8,6,8,11,4,9,5,9,6,9,12,4,7,5,7 

* is denote the Page Hit.

4 4 4   4   10 10 10 10   6   6 6 9 9  * 9  * 9 9 9 5  
  7 7  * 7  * 7 7 7 5   5   5 4 4 4   4   12 12 12 12  
    5   5   5 4 4 4   4   11 11 11 11   6   6 6 7 7  *
        6   6 6 8 8  * 8 * 8 8 8 5   5   5 4 4 4  

There were 18 pages faults.

Here, option 3 is correct.

Latest UPSC IES Updates

Last updated on May 28, 2025

->  UPSC ESE admit card 2025 for the prelims exam has been released. 

-> The UPSC IES Prelims 2025 will be held on 8th June 2025.

-> The selection process includes a Prelims and a Mains Examination, followed by a Personality Test/Interview.

-> Candidates should attempt the UPSC IES mock tests to increase their efficiency. The UPSC IES previous year papers can be downloaded here.

More Page Replacement Policy Questions

More Virtual Memory Questions

Get Free Access Now
Hot Links: teen patti master old version teen patti all game teen patti earning app teen patti gold new version 2024 teen patti master game