Replacement with First In First Out - FIFO

The First In - First Out replacement policy chooses the page which has been in the memory the longest to be the one replaced. The illustration uses the yellow rectangles to illustrate the page frames in memory. A red rectangle represents a page fault (a new page was written into that frame). The reference string for this example is the diagonal sweep string from the discussion on reference strings. (You may review reference strings by clicking on the red star in the illustration.)

The illustration shows the number of page faults is reduced from 11 to 5 by the addition of the third page frame. Since 5 pages are referenced, this is the optimum condition. But the FIFO policy does not always work this well.

To look at some of the problems--