Question: 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,
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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
