ECET360 Lab 5
FIFO Page Replacement Algorithm Simulation
Name: ______________________ Date: _____________
1. Objectives
• To simulate First In First Out (FIFO) memory page replacement algorithm using C/C++
• To gain more understanding of FIFO algorithm and the effect of number of frames to page fault rate
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.
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 FIFO 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 oldest page among all frames needed to be replaced with the new one
• 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 program to generate five different outputs by varying the number of pages and number of frames as well as the reference string. Crop just one of the output windows and paste it below. (5 pts)
3. Analysis and Conclusion
Make a table to show the results obtained from the five runs. Analyze the results. What is affected by the number of frames? (10 pts)
* 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].
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* 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.
* In case of any query, please donot hesitate to contact us at [email protected].
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.