Question: Dear Expert, Required in c++ language, TIA :) Simulate the LRU page replacement algorithm. Accept Number of pages and number of frames from the user
Dear Expert, Required in c++ language, TIA :)
Simulate the LRU page replacement algorithm. Accept Number of pages and number of frames from the user Accept the page numbers (reference string to store) Calculate the page faults and number of hits. Display the page reference string, the matrix to show how contents are changing in the frames, Calculate the Number of page faults, number of hits and the page fault percentage. A solved example with three frames: 1 2 3 4 5 3 4 1 6 7 8 9 7 8 9 5 4 5 4 2 LRU 1 1 4 4 4 7 7 7 5 1 4 22 33 N00 N00 con 2 5 4 8 8 5 3 1 3 1 6 1 6 5 4 9 8 9 6 9 sta 2 Page Faults = 13 Number of hits = 7 Page fault percentage = (page faultsumber of page accesses) * 100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
