Medium Operating Systems Virtual Memory
Compare FIFO, LRU, and Optimal page replacement algorithms.
Answer
When page fault occurs and memory is full, page replacement chooses which page to evict. FIFO removes oldest page - simple but suffers Belady's anomaly (more frames can cause more faults). LRU removes least recently used page - good approximation of optimal, implemented with timestamps or stack. Optimal removes page needed furthest in future - theoretically best but requires future knowledge, used as benchmark. LRU is practical compromise.
IIT Certified
Master These Concepts with IIT Certification
175+ hours of industry projects. Get placed at Bosch, Tata Motors, L&T and 500+ companies.
Relevant for Roles
Software Engineer Systems Developer Backend Developer