FIFO with Second Chance
Idea: do simple FIFO replacement, but give pages a “second chance” to prove their value before they are replaced.
- Every frame is on one of three FIFO lists:
active, inactive and free
- Page fault handler installs new pages on tail of active list.
- “Old” pages are moved to the tail of the inactive list.
Paging daemon moves pages from head of active list to tail of inactive list when demands for free frames is high.
Clear the refbit and protect the inactive page to “monitor” it.
- Pages on the inactive list get a “second chance”.
If referenced while inactive, reactivate to the tail of active list.