Scientific Converters Precise unit conversions for science & engineering.

    Loading…

    Page Replacement Calculator

    LRU evicts the page unused for the longest time: the classic 20-reference string with 3 frames causes 12 page faults (FIFO 15, Optimal 9).

    Algorithm:
    Page faults =

    12

    Hits
    8
    Hit ratio
    0.4
    Fault ratio
    0.6
    Frame contents after each reference
    StepPageFrame 1Frame 2Frame 3Result
    177––FAULT
    2070–FAULT
    31701FAULT
    42201FAULT
    50201hit
    63203FAULT
    70203hit
    84403FAULT
    92402FAULT
    103432FAULT
    110032FAULT
    123032hit
    132032hit
    141132FAULT
    152132hit
    160102FAULT
    171102hit
    187107FAULT
    190107hit
    201107hit
    Step-by-step solution
    1. LRU replaces the page not used for the longest time
    2. 12 faults in 20 references

    Page Replacement Formula

    hit ratio = hits ÷ references

    FIFO evicts the oldest, LRU the least recently used, Optimal the one used furthest ahead

    Worked Example

    The reference string 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 with 3 frames:

    1. LRU replaces the page not used for the longest time
    2. 12 faults in 20 references

    Hit ratio: 0.4 · Fault ratio: 0.6

    Frame contents after each reference
    StepPageFrame 1Frame 2Frame 3Result
    177––FAULT
    2070–FAULT
    31701FAULT
    42201FAULT
    50201hit
    63203FAULT
    70203hit
    84403FAULT
    92402FAULT
    103432FAULT
    110032FAULT
    123032hit
    132032hit
    141132FAULT
    152132hit
    160102FAULT
    171102hit
    187107FAULT
    190107hit
    201107hit

    GATE tip

    Count only the faults after the frames fill if the question says “excluding compulsory misses”; the table marks every fault so you can subtract the first ones.

    More Operating Systems Calculators

    Frequently asked questions

    What is Belady’s anomaly?

    With FIFO, adding frames can increase faults: 1 2 3 4 1 2 5 1 2 3 4 5 gives 9 faults with 3 frames but 10 with 4. LRU and Optimal never show it.

    Why is Optimal replacement not used in practice?

    It needs future references; it serves as a lower bound to compare other algorithms against.

    Sources

    Last reviewed: . Factors are stored exactly and computed with 50-digit decimal arithmetic. See how we verify conversion factors.

    Cite this page

    APA

    Scientific Converters. (2026, October 15). Page Replacement Calculator. Retrieved October 25, 2026, from https://scientificconverters.com/calculators/page-replacement-calculator/

    IEEE

    Scientific Converters, "Page Replacement Calculator," scientificconverters.com. Accessed: Oct. 25, 2026. [Online]. Available: https://scientificconverters.com/calculators/page-replacement-calculator/

    Send feedback

    Found a wrong value, a missing unit or an idea? Tell us. We read every message.

    What is it about?

    We store your message, the page you were on and your email if given. See the privacy policy.