You may work in a group of no more than 2-3 people.
Make sure you have installed on your VM:
sudo apt install python3
sudo apt install python3-pip
sudo apt install python3-tk
pip3 install matplotlib
You will be provided a program that you can run to evaluate TLB performance. You will need to compile this program using the gcc flag -O0
, and using Python, write a script to run this program, while varying the arguments for the number of pages accessed from 1 up to a few thousand (perhaps incrementing by a factor of two (2^1, 2^2, etc.)) per iteration. Run the script on your VM and gather some data.
Using matplotlib graph the results that looks similar to the one on page 15 of Chapter 19. Take a screen capture of this graph and add it to the repository.
One thing to watch out for is compiler optimization. Compilers do all sorts of clever things, including removing loops which increment values that no other part of the program subsequently uses. Try to compile the program with the optimization option -O3
and re-run your script. Take a screencap of this new graph and add it to the repository as well.
Visit the course Moodle page for the GitHub Classroom assignment link.
Answer all questions in the provided hw-answers.md
markdown file. Commit your python script and the graphs generated for Question 2 and 3. Graphs should look like the image below.
Note that the exact values you may get from your script may differ depening on the number of trials you run, and naturally, do not include a watermark on the image. ALL TEAM MEMBERS MUST SUBMIT THE ASSIGNEMT. Not submitting your solutions to GitHub will result in a zero for the assignment.