Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you help program each algorithm ( FIFO, LRU, and Optimal Page Replacement Algorithm) in C++ . Give detailed explanation and show output. Thank you
Can you help program each algorithm ( FIFO, LRU, and Optimal Page Replacement Algorithm) in C++. Give detailed explanation and show output. Thank you and Will rate it ASAP.
FIFO ( First In First Out) Algorithm of Page Replacement :- 7 0 1 2 0 3 0 4 2 2 3 0 3 2 1 2017 7 7 7 2 2 2 2 4 4 4 400OOOOO7 0 o f1 j2 fi 1 1 0 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 0 0 0 0 3 3 3 3 3 2 2 2 2 M M H M M H H M M H H M M M M M H M M Total No. of Passes > No. of Hoits + No. of Miss (fault) No. of Hits 1 6 No. Miss - 13 of Ratio of Miss : Hot 13:6 LRU (least Recently Used) Page Replacement Algorithm 1 + 0 1 2 O 3 04 2 2 3 0 3 2 1 2 0 1 7 f1 77 7 2 2 2 2 4 4 4 4 0 0 0 1 1 1 1 0 0 f2 o ooo 0 0 0 3 3 3 3 3 3 0 0 0 1 1 1 3 3 3 2 2 2 2 2 2 2 2 2 2 7 f3 M M M M H M H M M H M M H H M H M H M No. of Hits 7 No. of Miss = 12 ClauF) Ratio Miss Hit 12:7 * Optimal Page Replacement Algerithm :- 1 1 3 2 2.3 3 2 1 go1 + 24 + + 7 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 7 12 13 1 1 1 3 3 3 3 3 3 3 3 3 1 1 1 1 1 . No.. og Hits > No. Miss(Faults) 9 Ratio Miss : Hits ? 9:10Step 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