Skip to content
Java simulators for testing various page replacement schemes. Which one is the best?
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.




Java simulators for testing various page replacement schemes. Which one is the best?


The program uses three different types of reference strings to test the strategies against varying input. The first type is the random which randomly chooses the next page in memory, then there is the loop which takes in pages in a cyclical pattern with a few random pages thrown in to closer mimic reality. To calculate efficiency I measured the program measures both the time it takes to simulate and the number of page faults occurred.



  • Clone the repository

    git clone


  • Compile project

    javac src/*.java -d target/


  • Run Simulator

    java -cp target/ Simulator

  • Run First In First Out (FIFO)

    java -cp target/ FIFO

  • Run Least Recently Used (LRU))

    java -cp target/ LRU

  • Run LRUa

    java -cp target/ LRUa

  • Run Most Used

    java -cp target/ MostUsed

  • Run Optimal

    java -cp target/ Optimal

  • Run Random

    java -cp target/ Random


To contribute, submit any pull request and I will have look.


If you find any issues feel free to open a request in the Issues tab. If I have the time I will try to solve any issues but cannot make any guarantees. Feel free to contribute yourself.


Future Plans

  • Run using Java 8
  • Add Adaptive Replacement Cache (ARC)
  • Add Belady's Algorith
  • Add Clock with Adaptive Replacement (CAR)
  • Add Last In First Out (LIFO)
  • Add Least Frequently Used (LFU)
  • Add LFU with Dynamic Aging (LFUDA)
  • Add Low Inter-Reference Recency Set (LIRS)
  • Add Most Recently Used (MRU)
  • Add Multi Queue (MQ)
  • Add Panier
  • Add Psuedo-LRU)
  • Add Segmented Least Recently Used (SLRU)
  • Add Time Aware Least Recently Used (TLRU)
You can’t perform that action at this time.