Consider a process that has been allocated 5 pages of memory: P1, P2, P3, P4, and P5.
The process accesses these pages in the following order:
P1 P2 P3 P4 P1 P2 P5 P1 P2 P3 P4 P5
(i) Illustrate Belady's anomaly by precisely describing the execution of the FIFO page eviction algorithm in two cases: a) where the machine has 3 pages of physical memory, and b) where the machine has 4 pages of physical memory, and by comparing the number of page
faults incurred in these two cases. (When the process begins executing, none of its pages are present in memory.)
(ii) Show how the LRU page eviction algorithm would work in the same scenarios a) and b) described above