Homework #1This first homework will ask you to solve some problems from the textbook and to do some work on your own related to comparing perfomance and to locality. 1. 1.45 (page 48) (10 points) 2. 2.1 (page 90) (5 points) 3. 2.2 (page 90) (5 points) 4. 2.5 (page 90) (5 points) 5. 2.8 (page 91) (5 points) 6. 2.9 (page 91) (10 points) 7. 2.10 (page 91) (5 points) 8. 2.13 (page 92) (10 points) 9. Using files that contain addresses issued by some CPU to execute some application(s), draw the histogram of address distribution for each of them. On the Ox axis of the plot you will have the address number (don't start with zero, rather with the smallest address you find in the file and go up to the maximum address in the file). On the Oy axis you will have the number of occurences for each particular address. Please comment based on the histogram. The name of the files are
The first contains the traces obtained by executing the TeX document processor and the second one has been obtained using the cc compiler to compile itself. Each line in the file has two fields: the first field indicates what kind of operation the CPU performs (read, write, etc.), and the second field is the address; for this exercise you only need to consider the second column in the file. (60 points) 10. Write a program that multiplies two square matrices, whose elements are
randomly generated. You will have two versions of the program, one in which
matrix elements are integers and another one where they are real numbers.
You will compile and run the programs on two different systems (most likely
one of them will be some PC and the other one some workstation - delta0 through delta8). Maximum mark: 165 (100%) |