Implementation and comparison of several page replacement algorithms:
- FIFO: First in, first out
- LRU: Least recently used
- OPT: Optimal Replacement
- Python >=3.4
$ ./run.sh
Please note that installation of requirements packages can take some time, so go grab a coffee.
-
Create virtual environment
$ python3 -m venv env $ source env/bin/activate
-
Install requirements (Takes some time)
$ pip install --upgrade setuptools $ pip install -r requirements.txt
-
Run tests
$ python -m unittest discover tests/ "test_*.py"
-
Run simulation
$ python main.py <SEED> [--frames <MAX_FRAMES]
-
Deactivate environment
$ deactivate