Which of these is true of the FIFO page replacement algorithm?
Answer: C
Correct answer: It replaces the page that has been in memory the longest
FIFO replaces the page that has been resident longest, regardless of how recently or how often it has been used. It is implemented with a simple queue, so its cost is trivial. That simplicity is its only merit. Age of loading is a poor predictor of future need - a heavily used page loaded early is evicted while a rarely touched recent one survives - so its fault rate is markedly worse than LRU’s. It also suffers Belady’s anomaly: increasing the number of frames can increase the number of faults, which the third option denies. Algorithms free of the anomaly are the stack algorithms, of which LRU and the optimal algorithm are examples. The fourth option describes true LRU, which needs a timestamp or stack updated on every reference and is too expensive in practice. FIFO is rarely used unmodified. Adding a reference-bit check produces the second-chance or clock algorithm, which costs almost nothing more and approximates LRU well.
Please log in or register to report this question.