Question: Write a program to simulate the Least - Recently - Used ( LRU ) Page Replacement Algorithm that appears in the Virtual Memory chapter of

Write a program to simulate the Least-Recently-Used (LRU) Page Replacement Algorithm that appears in the Virtual Memory chapter of the textbook. Start with a reference string of your choice and show how the algorithm works, step-by-step.
The output from the simulator should indicate whenever a fault occurs, and which page has been evicted (if one is evicted). In addition, the output should include the total number of faults that occurred for the given reference string.
The possible output would look something like:
Page Fault: no page evicted; page 0 brought into memory.
Page Fault: page 2 evicted; page 3 brought into memory.
: :
Total number of faults is 23.
Write a program to simulate the Least - Recently

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!