Question: Required, In c++ dear expert. Simulate the OPTIMAL page replacement algorithm. Accept Number of pages and number of frames from the user Accept the page
Required, In c++ dear expert.
Simulate the OPTIMAL 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: reference string 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 7 7 7 2 7 2 2 2 2 17 0 0 0 0 4 0 0 0 1 1 3 3 3 1 1 page frames Page faults = 9 Number of hits = 20 - 9 = 11 Page fault percentage = (page faultsumber of page accesses) * 100 = 45%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
