Operating Systems 2014F: Tutorial 5
In this tutorial you will be going through homework exercises from the textbook. Be sure to look at the associated chapter if you have questions.
Note there are a lot of material here. Do not expect to do all of it in detail in tutorial; instead, try to do some of everything so you can see where have significant conceptual gaps. On your own you should do these exercises in more detail to make sure you understand the associated concepts.
Relocation
Use the program relocation.py to answer the following questions from the Address Translation chapter. There is also a video available.
- Run with seeds 1, 2, and 3, and compute whether each virtual address generated by the process is in or out of bounds. If in bounds,
compute the translation.
- Run with these flags:
-s 0 -n 10
What value do you have set -l (the bounds register) to in order to ensure that all the generated virtual addresses are within bounds?
- Run with these flags:
-s 1 -n 10 -l 100
What is the maximum value that bounds can be set to, such that the address space still fits into physical memory in its entirety?
- Run some of the same problems above, but with larger address spaces (-a) and physical memories (-p).
- What fraction of randomly-generated virtual addresses are valid, as a function of the value of the bounds register? Make a graph from running with different random seeds, with limit values ranging from 0 up to the maximum size of the address space.