Homework 1
Due Wednesday, September 8

1. Textbook exercise 1.2, page 75. Hint: You can use PowerPoint to draw the figures.

2. Textbook exercise 1.14, page 81.

3. Textbook exercise 2.4 (b) (c) and (d). Note that the answer to 2.4(a) has been given on page B-8. Hint: You can use a spreadsheet for each program on page B-8. In other words, you can organize your answers by program.

4. The purpose of this exercise is to use simulation to collect profiling data. Use the following instructions:
(1) Download and build simplescalar simulation from http://www.simplescalar.com/: click on "Tools" on the left side, then you will see simplesim-3v0d.tgz on the right side. Download it onto a Linux machine. The page also gives the links to the installation guide. Follow the guide to build the simplesim tools. Ignore any other parts for time being. (Notes: Use Alpha configuration, and you may want to turn on compiler optimization; change "-O0" to "-O" of line 81 of "Makefile".)
(2) Scan SimpleScalar User's Guide (users_guide_v2.pdf) and Hacker's Guide (hackers_guide_v2.pdf). You can find the files on  http://www.simplescalar.com/ (clicking on "Documentation" on the left side). Right now you don't have to learn all details in the documents.
(3) In step (1) seven simulation tools have been generated in your working directory. In this exercise you only use "sim-profile". Download two workloads, 176.gcc.eio.gz  and 183.equake.eio.gz. Use sim-profile to collect the profiling data for first five million instructions of the two workloads. If you use bash, the commands are:
    ./sim-profile -all -max:inst 5000000 176.gcc.eio.gz 2>&1 | cat > 176.gcc-profile.txt
    ./sim-profile -all -max:inst 5000000 183.equake.eio.gz 2>&1 | cat > 183.equake-profile.txt
Now the profiling data are in 176.gcc-profile.txt and 183.equake-profile.txt, respectively.

Complete the following questions:
(a) Briefly describe the categorization of profiling data generated by sim-profile.
(b) Create a spreadsheet as in Figures 2.32 and 2.33 but use instruction class "load", "store", "uncond branch", "int computation", "fp computation", and "trap". You don't need to calculate the average.
(c) Which single instruction has the highest percentage in the instruction mix for each workload?

5. Read "The case for the reduced instruction set computer" by David Patterson and David Ditzel, ACM SIGARCH Computer Architecture News, Vol.8, No.6, October 15, 1980, pp.25--33, and answer the following questions:
(a) As mentioned in the paper, CISC was favored when CPU was significantly faster than memory. Explain briefly. In comparison, SRAM memory (cache) in today's processor is as fast as CPU.
(b) According to the authors, what were the disadvantages of CISC?

6. Read "The future of microprocessors" by Albert Yu, IEEE Micro, December 1996, pages 46-53, and answer the following questions:
(a) According to this paper, how much was the difference between the predicted processor performance for 1996 and the actual performance? The prediction was made in 1989. What contributed to the unexpected improvement? Do you think the predicted performance for 2006 will be met?
(b) What are the difficulties in further improving processor performance as seen by the author?
(Note: The author was a then senior vice president of the Intel Corporation.)