CPSC 3300 - Spring 2017 Homework 2 Due at class time on Thursday, February 2 Each student must turn in a separate set of homework solutions, but you may work together in study groups with other students from the class. Include the names of your study group members on the solution set you submit. (It is acceptable for the group to prepare one document and then for each group member to turn in a copy of that document with his or her name highlighted or circled.) Also, please provide sufficient space on your homework solutions so that your calculations and answers are easily readable and so that grading will be easier. Furthermore, except for the simplest of questions, giving only the answer without showing your work is not acceptable. For the best chance at partial credit, show the generic equation you are starting with and any derivations needed to handle the information as given in the question, then plug in the values from the question. 1. For a processor with 3 GHz clock frequency (a.k.a. clock rate), what is the clock cycle time? (6 pts.) 2. Find the execution time for a program that executes 3 billion instructions on a processor with an average CPI of 2.0 and a clock frequency of 4 GHz. (10 pts.) 3. P1 has a 3.0 GHz clock frequency and an average CPI of 1.5 on a given program. If the processor executes that program in 10 seconds, find: (6 pts. each) (a) the number of cycles, and (b) the number of instructions. [This is question 1.5(b) for processor P1 from the textbook.] 4. What is the MIPS rate for processor P1 in question 2 above? Use the MIPS formula that contains only the clock rate and CPI. (6 pts.) 5. For the following workload and cycle values, find the average CPI. [This is a weighted average that uses the instruction frequencies as weights. You do not divide by three.] (6 pts.) type | freq cycles -------+-------------- alu | 0.4 1 ld/st | 0.4 4 branch | 0.2 2 6. If a new compiler for the computer in question 5 could reduce the number of instructions to 80% of the original total and alter the instruction frequencies in the following manner, what would be the total speedup? (18 pts.) type | freq cycles -------+-------------- alu | 0.6 1 ld/st | 0.3 4 branch | 0.1 2 7. Consider a vector computer in which vector mode can provide a speedup of 10. Using Amdahl's Law: (12 pts. each) (a) What is the overall speedup for each incremental twentieth in the fraction of vectorization (i.e., f = 0.05, 0.1, 0.15, ..., 0.95, 1.0)? You should express the speedup values with two decimal places. (Hint: use a spreadsheet. You can also chart the values.) (b) What amount of vectorization is required for an overall speedup of 2? Solve the problem algebraically and express the answer as a reduced fraction rather than a decimal or a percentage. (c) What amount of vectorization is required for an overall speedup of 5? Solve and express the answer as directed in part (b). 8. Arithmetic/Harmonic/Geometric. Circle one of A, H, or G, as applies. (2 pts. each) A H G - Used for averaging normalized times or rates. A H G - Used for averaging execution rates. A H G - Used for averaging execution times.