{"id":23088149,"url":"https://github.com/jrquick17/java-page-replacement-strategies","last_synced_at":"2025-07-14T20:32:31.590Z","repository":{"id":96550092,"uuid":"54809737","full_name":"jrquick17/java-page-replacement-strategies","owner":"jrquick17","description":"Java simulators for testing various page replacement schemes. Which one is the best?","archived":false,"fork":false,"pushed_at":"2019-06-26T00:59:04.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T16:52:21.562Z","etag":null,"topics":["fifo","java","lru","lrua","page-replacement-simulator"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrquick17.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-27T02:54:23.000Z","updated_at":"2020-01-20T03:30:51.000Z","dependencies_parsed_at":"2023-04-27T16:47:25.986Z","dependency_job_id":null,"html_url":"https://github.com/jrquick17/java-page-replacement-strategies","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jrquick17/java-page-replacement-strategies","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrquick17%2Fjava-page-replacement-strategies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrquick17%2Fjava-page-replacement-strategies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrquick17%2Fjava-page-replacement-strategies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrquick17%2Fjava-page-replacement-strategies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrquick17","download_url":"https://codeload.github.com/jrquick17/java-page-replacement-strategies/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrquick17%2Fjava-page-replacement-strategies/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265344831,"owners_count":23750566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fifo","java","lru","lrua","page-replacement-simulator"],"created_at":"2024-12-16T20:16:06.486Z","updated_at":"2025-07-14T20:32:31.582Z","avatar_url":"https://github.com/jrquick17.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# java-page-replacement-strategies\n\n## Index ##\n\n* [About](#about)\n* [Run](#run)\n* [Issues](#issues)\n* [Contributing](#contributing)\n* [Future Plans](#future-plans)\n\n## About ## \n\nJava simulators for testing various [page replacement schemes](https://en.wikipedia.org/wiki/Cache_replacement_policies). \nWhich one is the best? \n\n* Visit [my website](https://jrquick.com) for me cool stuff!\n\n### Process ###\n\nThe program uses three different types of reference strings to test the strategies against varying input. \nThe first type is the random which randomly chooses the next page in memory, then there is the loop which takes in \npages in a cyclical pattern with a few random pages thrown in to closer mimic reality. \nTo calculate efficiency I measured the program measures both the time it takes to simulate and the number of page \nfaults occurred.\n\n## Run\n\n### Clone\n\n* Clone the repository\n\n    ```git clone git@github.com:jrquick17/java-page-replacement-strategies.git```\n    \n### Compile\n    \n* Compile project\n\n    ```javac src/*.java -d target/```\n    \n### Run\n    \n* Run Simulator\n\n    ```java -cp target/ Simulator```\n    \n* Run First In First Out ([FIFO](https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)))\n\n    ```java -cp target/ FIFO```\n    \n* Run Least Recently Used ([LRU](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU))))\n\n    ```java -cp target/ LRU```\n    \n* Run LRUa\n\n    ```java -cp target/ LRUa```\n    \n* Run Most Used\n\n    ```java -cp target/ MostUsed```\n    \n* Run Optimal\n\n    ```java -cp target/ Optimal```\n    \n* Run [Random](https://en.wikipedia.org/wiki/Cache_replacement_policies#Random_replacement_(RR))\n\n    ```java -cp target/ Random```\n    \n\n## Contributing ##\n\nTo contribute, submit any pull request and I will have look.  \n\n## Issues ##\n\nIf you find any issues feel free to open a request in [the Issues tab](https://github.com/jrquick17/java-page-replacement-strategies/issues). If I have the time I will try to solve any issues but cannot make any guarantees. Feel free to contribute yourself.\n\n### Thanks ###\n\n* [jrquick17](https://github.com/jrquick17)\n\n## Future Plans\n\n* Run using Java 8\n* Add Adaptive Replacement Cache ([ARC](https://en.wikipedia.org/wiki/Cache_replacement_policies#Adaptive_replacement_cache_(ARC)))\n* Add [Belady's Algorith]((https://en.wikipedia.org/wiki/Cache_replacement_policies#B%C3%A9l%C3%A1dy's_algorithm))\n* Add Clock with Adaptive Replacement ([CAR](https://en.wikipedia.org/wiki/Cache_replacement_policies#Clock_with_adaptive_replacement_(CAR)))\n* Add Last In First Out ([LIFO](https://en.wikipedia.org/wiki/Cache_replacement_policies#Last_in_first_out_(LIFO)))\n* Add Least Frequently Used ([LFU](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least-frequently_used_(LFU)))\n* Add LFU with Dynamic Aging ([LFUDA](https://en.wikipedia.org/wiki/Cache_replacement_policies#LFU_with_dynamic_aging_(LFUDA)))\n* Add Low Inter-Reference Recency Set ([LIRS](https://en.wikipedia.org/wiki/Cache_replacement_policies#Low_inter-reference_recency_set_(LIRS)))\n* Add Most Recently Used ([MRU](https://en.wikipedia.org/wiki/Cache_replacement_policies#Most_recently_used_(MRU)))\n* Add Multi Queue ([MQ](https://en.wikipedia.org/wiki/Cache_replacement_policies#Multi_queue_(MQ)))\n* Add [Panier]((https://en.wikipedia.org/wiki/Cache_replacement_policies#Pannier:_Container-based_caching_algorithm_for_compound_objects))\n* Add [Psuedo-LRU](https://en.wikipedia.org/wiki/Cache_replacement_policies#Pseudo-LRU_(PLRU)))\n* Add Segmented Least Recently Used ([SLRU](https://en.wikipedia.org/wiki/Cache_replacement_policies#Segmented_LRU_(SLRU)))\n* Add Time Aware Least Recently Used ([TLRU](https://en.wikipedia.org/wiki/Cache_replacement_policies#Time_aware_least_recently_used_(TLRU)))\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrquick17%2Fjava-page-replacement-strategies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrquick17%2Fjava-page-replacement-strategies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrquick17%2Fjava-page-replacement-strategies/lists"}