1
$\begingroup$

I am wondering if there is an instance where FIFO results in less page faults than LRU. For example:

2,6,5,7... 

In this string, if I have to complete it by giving 3 additional terms, can I prove FIFO shows less page faults

I have proved how LRU can show less Page faults. But I cannot think of the initial problem statement solution. Any hints would really be great!

$\endgroup$
1
  • $\begingroup$ Why do you put the constraint "by giving 3 additional terms"? Is this the original question? $\endgroup$
    – xskxzr
    Feb 21, 2019 at 12:12

1 Answer 1

2
$\begingroup$

For anyone visiting this thread in the future, FIFO can have less page faults in some scenarios.

In this one ( <2, 6, 5, 7, ..., ..., ...> ), it can be completed with 2, 8, 6.

The access of 2 means that the least recently used page is 6, but the first page in is still 2.

The access of 8 replaces 2 in FIFO, but 6 in LRU.

The access of 6, therefore, is a hit with FIFO, but a miss with LRU.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.