InClassActivity04 Sol
InClassActivity04 Sol
A. The current machine, codenamed “Jaguar”, has a clock rate of 750MHz. The hardware team claims
that it can improve the clock rate to 1.5GHz. The codename for this improved machine is “Jaguar-EH”.
Specs for both the machines are shown in Table 1 below. A standard practice in the computer industry is
to perform extensive simulations of new designs before producing them. For instance, we can run a
series of benchmark programs on a simulator for a new processor, and make valuable measurements.
Such a study yielded the data shown in the last two columns for Jaguar-EH:
2
4
2
5
2
a. (15 points) Calculate the average CPI and MIPS ratings for Jaguar.
Answer: Average CPI = 3*0.40 + 5*0.25 + 4*0.15 + 6*0.10 + 2*0.10 = 3.85 cycles/instruction
750× 106 cycles / sec
= 194.81× 106 instr/ sec = 195 MIPS
MIPS = 3.85 cycles / instr
Grading Policy: 15 pts for correct answer, 6 pts partial, 0 pts no answer.
b. (15 points) Calculate the average CPI and MIPS ratings for Jaguar-EH.
Answer: Average CPI = 2*0.40 + 4*0.25 + 2*0.15 + 6*0.10 + 2*0.10 = 2.80 cycles/instruction
1500× 106 cycles / sec
= 535.71× 106 instr/ sec = 536 MIPS
MIPS = 2 . 80 cycles / instr
Grading Policy: 15 pts for correct answer, 6 pts partial, 0 pts no answer.
Answer: The improvement is the inverse ratio of the execution times. Note that ratio of execution
times is equivalent to inverse ratio of MIPS in here, because the frequencies of usage of the
instructions are the same.
ECSE-2660 Computer Architecture, Networks, & Operating Systems, Spring 2014 Page 1 of 4
Meanwhile, the compiler team comes up with enhancements that reduce the number of instructions
executed. They have codenamed their product “Jaguar-EC”. Their simulation studies produce the
following data:
In Percent CP
str age of I
uc instruc for
tio tions Ja
n execute gu
Cl d ar-
as by E
s Jaguar C
-EC
compar
ed to
Jaguar
A 75% 3
B 95% 5
C 80% 4
D 90% 6
E 80% 2
Note that CPI for this machine is slightly higher than for the base Jaguar. This is not surprising
since we now have a higher percentage of type B and D instructions that take longer. So, the
compiler team improved type A, C, and E instructions a lot, but they did not follow the Amdahl’s
Law and ignored improving the more frequently used instructions!
Grading Policy: 15 pts for correct answer, 6 pts partial, 0 pts no answer.
The cycle time on Jaguar and Jaguar-EC is 1/(750 MHz) seconds = 0.0013*10-6 seconds =
1.3ns/cycle
Execution time on Jaguar = 100 instructions× 3.85 cycles/instruction× 1.3ns/cycle = 500.5 ns.
Execution time on Jaguar-EC = 82.75 instructions× 3.95 cycles/instruction× 1.3ns/cycle = 424.9 ns.
ECSE-2660 Computer Architecture, Networks, & Operating Systems, Spring 2014 Page 2 of 4
TimeJaguar 500.5
= = 1.18
TimeJaguar− EC 424.9
Therefore, performance improvement = times faster, i.e. 18% faster.
Grading Policy: 15 pts for correct answer, 6 pts partial, 0 pts no answer.
ECSE-2660 Computer Architecture, Networks, & Operating Systems, Spring 2014 Page 3 of 4
B. Combining Hardware and Software Ideas
a. (25 points) The hardware and software teams decide to combine their enhancements. They codename
their joint creation “Jaguar-EE”. Calculate how much faster this machine is compared to Jaguar.
Answer: This calculation is similar to the one above, except that the number of cycles for
instructions for various instruction types are from the second table (EH).
#instr. On EC
30.00 (= 40× 75%)
23.75 (= 25× 95%)
12.00 (= 15× 80%)
9.00 (= 10× 90%)
8.00 (= 10× 80%)
Execution time on Jaguar = 100 instructions× 3.85 cycles/instruction× 1.3ns/cycle = 500.5 = 501 ns.
Execution time on EE = 82.75 instructions× 2.90 cycles/instruction × (1/1.5)ns/cycle = 160 ns.
Time Jaguar 501
= = 3.13
Therefore, performance improvement = Time EE 160 times faster.
Note that 2.75x1.18=3.25; software and hardware improvements don’t multiply exactly.
Grading Policy: 10 pts for correct time on Jaguar, 10 for Jaguar-EE, 5 for ratio, 5 pts for trying, 0
pts no answer.
ECSE-2660 Computer Architecture, Networks, & Operating Systems, Spring 2014 Page 4 of 4