.TH MYMEMORY 1 "APRIL 2018" UPEM "myMemory manual" .SH NAME myMemory.py \- Memory paging simulator .SH SYNOPSIS myMemory.py [-h] -s
-v -a .SH DESCRIPTION .B myMemory Simulates a virtual memory manager, allowing the user to load requested pages into a main memory, extended with a virtual memory of a fixed size. The simulator handles several paging strategies, which are detailed below. .SH OPTIONS .IP -h Displays a short help text. .IP "-s
" Specifies the size of the main memory. Mandatory argument. .IP "-v " Specifies the size of the virtual (secondary) memory. Must be larger than the main memory size. Mandatory argument. .IP "-a " Uses the specified page management algorithm. Available algorithms are listed below. .SH PAGING ALGORITHMS .IP fifo "First-in, first-out" strategy replacing the oldest loaded page with the requested one. Clock-variant. .IP random Selects and replaces a page randomly. .IP lru "Least Recently Used" strategy keeping track of the last request time of each page and replacing the least recently used one. .IP secondchance "Second chance" strategy similar to FIFO, but avoiding swapping out pages requested twice while they are in the main memory. .SH COMMANDS The following commands can be used to interact with the simulator: .IP "A number" Requests a page to be loaded in the main memory. .IP `p` Lists the pages in the main and secondary memories. .IP `x` Exits the program. .SH EXAMPLE .nf % ./myMemory.py -s 3 -v 5 -a fifo > 7 7xx > 0 70x > 1 701 > 2 201 > p 201 7xxxx > 0 201 > 3 231 > p 231 70xxx > 0 230 > p 230 71xxx > 4 430 > 2 420 > p 420 713xx > x .fi .SH AUTHORS Pacien TRAN-GIRARD, Adam NAILI