You may work in groups on this lab. Make sure all lab members put their name on the writeup. It is also useful to put an entry in the Note section on Moodle that lists your lab partners.
This lab will investigate the cache performance on Sleipnir using code provided by Dr. Marc Thomas. You can retrieve the code from the following directory: www.cs.csub.edu/~melissa/cs321-w13/lab3/
Make sure to copy every file from that directory, including the Makefile. To compile all of the programs for this lab, give the command:
make all
/sys/devices/system/cpu/cpu*/cache/index*/Run the code with the command
./cache_info
./cache_offNote the poor performance, as this might be useful when evaluating the next program, which is the bulk of this lab.
line_offset
variable in the program).
To run this program, you will give the following shell command:
while true; do echo "127" | ./cache | grep Bandwidth; sleep 10; donewhere 127 is the skip value. Let this loop run for about a dozen iterations before hitting CTRL-C, so that you can gather an observed average (removing any outliers that may have been caused by other running programs). The results of the last iteration will be stored in the logfile
cache_<skipValue>.log
Use the following skip values when running the program (note that these are pairs of similar numbers where the second number is a power of 2 and the first number is a prime close to the second number):
127 128 251 256 509 512 1021 1024 2039 2048 4093 4096
cache
program that was requested above.
Note any trends between the pairs of values (e.g. between 127 and 128 or between 1021 and 1024) you saw when compiling this table. Try to explain these trends.
Upload your writeup to Moodle.