Question
Objective The objective of this assignment is to become familiar with the virtual memory address page replacement algorithms Assignment: Implementing the page replacement algorithm Write
Objective
The objective of this assignment is to become familiar with the virtual memory address page replacement algorithms
Assignment: Implementing the page replacement algorithm
Write a C/C++ program that implements the FIFO, LRU, and optimal page replacement algorithms presented in this chapter. First, generate a random page-reference string where page numbers range from 0 to 9.
Apply the random page-reference string to each algorithm, and record the number of page faults incurred by each algorithm.
As an example, your program would run as follows:
./vmmpr 1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2.
Your program would output the total number of page faults for each algorithm based upon the supplied reference string.
Error Handling
Perform the necessary error checking to ensure the correct number of command-line parameters. Assume a reference string maximum of 40 numbers.
Grading
The program will be graded on the basic functionality, error handling and how well the implementation description was followed. Be sure to name your program vmmpr.c (no extra characters, capitals) Note that documentation and style are worth 10% of the assignment's grade!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started