Page Replacement Algorithms

  1. FIFO Page Replacement.
    • We maintain a queue of pages based on the order in which they were loaded to memory.
    • As new pages are brought into memory, they are added to the tail of a queue, and the page at the head of the queue (the page sitting in memory for the longest time) is the next victim.
    • The victim page will be removed from memory (copied back to disk,) and the page that the process is requesting will be copied from disk into memory.
    • This algorithm is simple, but not efficient, as it will result in a large number of page replacements.
    • Belady's anomaly is a phenomenon in which an increase in the number of frames leads to an increase in the number of page faults (which is counterintuitive.) FIFO Page Replacement exhibits this phenomenon, as we shall see in a future slide.