Java simulators for testing various page replacement schemes. Which one is the best?
- Visit my website for me cool stuff!
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 git@github.com:jrquick17/java-page-replacement-strategies.git
-
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.
- 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)