Page Replacement Algorithm

Page Replacement Algorithm

In a computer operating system that uses paging for virtual memory management, page replacement algorithms decide which memory pages to page out (swap out, write to disk) when a page of memory needs to be allocated. Paging happens when a page fault occurs and a free page cannot be used to satisfy the allocation, either because there are none, or because the number of free pages is lower than some threshold.

When the page that was selected for replacement and paged out is referenced again it has to be paged in (read in from disk), and this involves waiting for I/O completion. This determines the quality of the page replacement algorithm: the less time waiting for page-ins, the better the algorithm. A page replacement algorithm looks at the limited information about accesses to the pages provided by hardware, and tries to guess which pages should be replaced to minimize the total number of page misses, while balancing this with the costs (primary storage and processor time) of the algorithm itself.

The page replacing problem is a typical online problem from the competitive analysis perspective in the sense that optimal deterministic algorithm is known.

Read more about Page Replacement Algorithm:  History, Local Vs. Global Replacement, Precleaning, Anticipatory Paging, The (h,k)-Paging Problem, Marking Algorithms, Conservative Algorithms, Working Set

Famous quotes containing the words page and/or replacement:

    Any man who can write a page of living prose adds something to our life, and the man who can, as I can, is surely the last to resent someone who can do it even better. An artist cannot deny art, nor would he want to. A lover cannot deny love.
    Raymond Chandler (1888–1959)

    Not even the visionary or mystical experience ever lasts very long. It is for art to capture that experience, to offer it to, in the case of literature, its readers; to be, for a secular, materialist culture, some sort of replacement for what the love of god offers in the world of faith.
    Salman Rushdie (b. 1947)