When turning in a homework problem, mark it with the exercise number shown in bold here. These will be the reference numbers I use in reporting back your standing on the homework.
4.10 on pages 273-274. Note that the textbook has a typo in this problem, at least in some printings. The second and third columns of the table should be headed "CPI on I1" and "CPI on I2", not "CPI on M1" and "CPI on M2".
I just ran a program on two computers in the OHS 326 lab. It took 0.232 seconds on a 2.66 GHz Pentium 4 and .377 seconds on a 1.86 GHz Core 2. How do the two machines' CPIs compare for this program? (The same compiled version was used on both machines, so the number of instructions should be the same. On the Core 2, which has two processors, only one processor was used, so you can ignore that issue.)
Another program took 9.268 seconds on the Pentium 4 and 9.127 seconds on the Core 2. How do the two machines' CPIs compare running this second program? (Again, the same instructions were executed and only one processor was used on each machine.)
One of these two program was a real program (to do something useful), which had a complex mixture of instructions within its main loop. The other was a simple test program that had an entirely empty main loop, which is to say, the only instructions were the ones to do the looping itself. Speculate as to which program is which and explain why you think so.
4.x2: You are considering a change in the design of a computer. The software that runs on the computer is fixed, and will not be changed. The computer can execute floating point instructions in 4 cycles each and other instructions in 1 cycle each. The average CPI (for the particular software, which is fixed) is 2. A proposed revision to the computer's design would allow the cycle time to be reduced by 40%. However, the floating point instructions will now take 5 cycles and the other instructions will take 2 cycles.
What fraction of the instructions executed are floating point?
What is the average CPI of the new computer running the same workload?
Is the proposed change beneficial for this workload? Why or why not?
Instructor: Max Hailperin