# ECET360 Week 6 Lab – LRU Page Replacement Algorithm Simulation – With Lab Report – Perfect Solution – Instant Delivery

Lab Price = \$15
Payment methods

Problem Statement
DeVry University
ECET360 Lab 6
LRU Page Replacement Algorithm Simulation

Name: ______________________ Date: _____________

1. Objectives
• To simulate Least Recently Used (LRU) memory page replacement algorithm using C/C++
• To compare and analyze FIFO and LRU algorithms
2. Procedures
We can think that the virtual memory is the hard disk and the main memory is the RAM in PC. Assume that the virtual memory has 5 to 9 pages and the main memory has 3 to 5 frames. The frame size is the same as page size. The size can be any reasonable kilobytes, say, 16 Kbytes or 64 Kbytes. Modify your last week’s lab and simulate LRU page replacement algorithm.
a. In this program, you will:
• Prompt the user to enter the number of pages (5 to 9)
• Prompt the user to enter the number of frames (3 to 5)
• Prompt the user to enter the page reference string. Spaces are used to separate the page numbers referenced by the processes.
• Implement the LRU page replacement algorithm. Your program should cover a few situations:
o Pure page demanding (at least one frame is left in the main memory, occurs initially)
o The page requested is already in one of the frames in the main memory (requested before and not replaced yet)
o The page is not in the main memory and the LRU page among all will be replaced
• Display all frame replacements sequence
• Calculate and display the number of page faults

Sample outputs:

b. Built and debug the program. Copy the source file below. (35 pts)

c. Run the LRU program to generate five outputs using the same five input sets you used in Lab 5 for FIFO algorithm. Crop a typical output window and paste it below. (5 pts)

3. Conclusion
Add one more column or row in the table you listed in Lab 5 conclusion. Compare the results and write a conclusion (8 to 10 sentences). (10 pts)

Relevant Material
Screenshots
Instructions
* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at [email protected].
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at [email protected] and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.