aboutsummaryrefslogtreecommitdiff
path: root/myMemory.1
blob: 4de19abf3a01151c7b8e64f0a213814d278a6230 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.TH MYMEMORY 1 "APRIL 2018" UPEM "myMemory manual"
.SH NAME
myMemory.py \- Memory paging simulator
.SH SYNOPSIS
myMemory.py [-h] -s <main mem size> -v <virtual mem size> -a <algorithm>
.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 <main mem size>"
Specifies the size of the main memory. Mandatory argument.
.IP "-v <virtual mem size>"
Specifies the size of the virtual (secondary) memory. Must be larger than the main memory size. Mandatory argument.
.IP "-a <algorithm>"
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