Question:hard

What is the number of page faults for the following memory reference sequence using LRU considering 3 frames per process?

1, 7, 2, 3, 2, 4, 5, 6, 1

Show Hint

Only the repeated 2 is a hit. Count the rest as faults.
Updated On: Jul 2, 2026
  • 5
  • 6
  • 7
  • 8
Show Solution

The Correct Option is D

Solution and Explanation

Only one reference in the whole string can be a hit, and that is the second access to 2, because 2 is still resident when it is used again right after 3.

Every other reference either loads a brand new page or reloads a page that LRU had already thrown out. There are 9 references in total.

$$\text{Faults} = 9 \text{ references} - 1 \text{ hit}$$

The single hit is the repeated 2. Subtracting it from all nine accesses leaves eight misses.

\[\boxed{8 \text{ page faults}}\]
Was this answer helpful?
0