next up previous
Next: Start poking around the Up: Homework 2: Caching Previous: Homework 2: Caching

Get the program and compile it

1.
Pick up the ``Cache-testing program'' from

http://rocky.colby.edu/cs357/code/hw2/cache.tar
It is a tar file, which means you will have to use the UNIX utility tar to unpack it. Read the documentation for tar to find out how.

2.
Read the code. There are some system calls and things here that we will probably want to use later, so keep this program around for future reference.

3.
The program comes with a Makefile that contains information about how to compile the program. The UNIX utility make reads the Makefile and performs the appropriate steps. You should read the documentation of make and gcc, which is the C compiler.

Compile and run the program. It takes a while to run, but after a few lines you get a sense of what the output looks like. Take a look at the code and figure out what the units are for Size and Stride.

When you run the program, you will probably want to redirect the output into a file. For example,

./cache > data
will put the output in a file named data. The reason it says ./cache is to specify that the executable named cache is in this directory, which may not be in the current path.


next up previous
Next: Start poking around the Up: Homework 2: Caching Previous: Homework 2: Caching
Allen Downey
2000-02-14