Simulator
In this lesson, you will use a simple program, which is known as 'paging-linear-translate.py', to see if you understand how simple virtual-to-physical address translation works with linear page tables.
We'll cover the following...
We'll cover the following...
To run
the program, remember to either type just the name of the program
(./paging-linear-translate.py
) or possibly this (python paging-linear-translate.py
). When you run it with the -h
(help) flag, you
see:
Usage: paging-linear-translate.py [options]
Options:
-h, --help show this help message and exit
-s SEED, --seed=SEED the random seed
-a ASIZE, --asize=ASIZE
address space size (e.g., 16, 64k, ...)
-p PSIZE, --physmem=PSIZE
physical memory size (e.g., 16, 64k, ...)
-P PAGESIZE, --pagesize=PAGESIZE
page size (e.g., 4k, 8k, ...)
-n NUM, --addresses=NUM number of virtual addresses to generate
-u USED, --used=USED percent of address space that is used
-v verbose mode
-c compute answers for me
First, run the program without any arguments in the terminal below:
./paging-linear-translate.py
Here is what you will see:
ARG seed 0
ARG address space size 16k
ARG phys mem size 64k
ARG page size 4k
ARG verbose False
The format of the
...