What is the speedup of the modification, if any? Is it reasonable to assume that the instruction counts don't change? That is, under what conditions is it possible to get the type of modification presented in this problem.
Answer: Let CCT, CPI and IC denote clock cycle time, cycles per instruction and instruction count respectively. We have
It is not reasonable to assume the instruction counts don't change. After a machine is modified, the machine may use different instruction set with different instruction counts to finish the same job.
Answer:
Put the values into the Amdahl's law equation (textbook P.30) :
Speedup = 1/((1-0.75)+(0.75/10)) = 3.077.
What is the effective speedup? What percentage of the new execution time is spent using the new square-root process?
If I wanted to achieve an effective speedup of 4, how much faster would the new square-root process need to be.
Answer: Before enhancement, the program spends 8/10=80% of time in the square-root routine. After the enhancement, it takes 8s*10% = 0.8s to do the square-root calculation. Thus, the enhanced speed up = 8/0.8 = 10. Put the values into the equation (textbook P.30). Speedup = 1/((1-0.8) + (0.8/10)) = 3.57.
In order to obtain an effective speedup of 4, 4 =
1/((1-0.8)+(0.8/
)).
= 16.
Answer:
Let and
be the execution time of the program before
and after enhancement respectively. We cannot apply the equation
(textbook P.30) directly. But, by its principle, we have
=
*((1-0.2) + (0.2/0.1)) = 2.8
. Thus, the effective
speedup =
= 2.8.
During unenhanced execution, the program spends 0.2*10 =
2
time for the enhanced process. The corresponding fraction =
2
/
= 2/2.8 = 71.43%.