Skip to content

lucascarrr/Page-Replacement-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CSC3002 Assignment

CRRLUC003 || Lucas Carr

Implementation of FIFO, LRU, and Optimal page replacement algorithms

To Run:

The program takes 2 arguments, execute it by running: python paging.py [arg1] [arg2]

[arg1] refers to the number of page references you would like

[arg2] refers to the number of frames you would like

Output Example for case of: python3 pages.py 32 3

________________________________________ 

PAGE REPLACEMENT ALGORITHMS
________________________________________ 

Number of References:  32 
Number of Frames:  3 
Page References:  [5, 4, 1, 1, 8, 5, 8, 7, 
0, 7, 3, 8, 0, 2, 2, 6, 1, 3, 3, 0, 8, 7, 
7, 4, 3, 6, 7, 0, 3, 8, 6, 3]
________________________________________ 

FIFO:  24  page faults.
LRU:   25  page faults.
OPT:   16  page faults.
________________________________________ 

If you would like, you may run the program with only the 1st argument (that is, where you specify the number of page references you want). In this case, the number of frames will default to 3.

You must run the program with at least 1 argument.

Program was written to be compiled on python3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages