In: Computer Science
Consider the following page reference string:5, 1, 5, 5, 3, 6, 2, 3, 0 , 7, 2, 5, 2, 1, 7, 2, 3, 1, 4, 6.Assuming demand paging with three frames, how many page faults would occur for the following replacement algorithms?• LRU replacement• FIFO replacement• Optimal replacement
In LRU the page that has not been referenced for the longest time gets evicted.
The hits are colored in green, so total of 6 hits and 14 faults.
In FIFO replacement the page that has been for the longest time(which has arrived the first among the pages present in cache currently) in the cache gets evicted
number of hits =7 , faults=13
In OPT replacement policy ,among the pages currently in cache the page that will not be used for the longest time gets evicted.
the number of hits are 10 and faults=10