Question: NEEDS TO BE WRITTEN IN C. Write a program that takes a reference string and the number of frames as inputs to simulate page replacement
NEEDS TO BE WRITTEN IN C. Write a program that takes a reference string and the number of frames as inputs to simulate page replacement algorithms. Suppose the maximum length of a reference string is 30 and there are 5 differnt numbers of pages. Randomly generate a reference string, e.g. 2 1 3 4 5 2 3 .... Take the number of frames as an input. Find out the different number of page faults using the Optimal and LRU algorithms. If there is a tie, use FIFO algorithm to break the tie. Print out the page replacement process step by step (you can print this your own way as long as it clearly shows page faults and how the pages are replaced).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
