Homework #12 - TLB

You may work in a group of no more than 2-3 people.

Setup

Make sure you have installed on your VM:

Instructions

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.

Question 1: How many trials are needed to get reliable measurements?

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.

Question 2: Write a brief statement to try and explain the findings in your graph.

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.

Question 3: Did you notice any changes using the new compilaion flag?

Resources

Visit the course Moodle page for the GitHub Classroom assignment link.

Submission

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.

Sample Graph

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.

Grading (4 Points)