Skip to content

A Python implementation of various Page Replacement algorithms.

Notifications You must be signed in to change notification settings

esaimorales/Page-Replacement-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page-Replacement-Simulation

A Python implementation of various Page Replacement algorithms.

Implementations for the following algorithms are provided:

  • Least Frequently Used (lfu.py)
  • Least Recently Used (lru.py)
  • Second Chance (sc.py)
  • Random (rand.py)

A sample page call procedure is given in numbers.txt.

How to Run:

python file_name.py CACHE_SIZE < numbers.txt

Results

Cache Size LFU LRU Second Chance Random
10 7963 4248 4248 4561
50 7690 3942 3967 4057
100 7313 3727 3747 3843
250 6483 3405 3384 3463
500 5300 2904 2911 3011

About

A Python implementation of various Page Replacement algorithms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages