21.5k views
0 votes
Consider the following sequence of page references: 1 2 3 3 4 4 1 4 1 3 4. Determine how many page faults will occur with LRU(Least Recently Used) for each of the following algorithms, assuming there are only 2 physical page frames and that both are initially empty.

User Shenika
by
5.7k points

1 Answer

2 votes

Answer:

7 page faults

Step-by-step explanation:

I have created a small Java program that can be seen in the attached picture below. This Java program uses an LRU algorithm in order to find the number of page faults within an array of page references from the references given in the question. Using these references, and the java program we can see that there are a total of 7 page faults. This can be seen in the output highlighted by red in the picture below.

Consider the following sequence of page references: 1 2 3 3 4 4 1 4 1 3 4. Determine-example-1
User Linto Cheeran
by
7.0k points