Speeding up a new floating-point unit by 2 slows down data cache accesses by a factor of 2/3 (or a 1.5 slowdown for data caches). If old FP unit took 20% of program's execution time and data cache accesses took 10% of program's execution time, what is the overall speed up?
I solved this problem using amdahl's law:
FeFP = floating point enhanced fraction = .2
FeDC = data cache access enhanced fraction = .1
SeFP = floating point enhanced speedup = 2
SeDC = data cache access enhanced speedup = 2/3
Speedup overall = 1 / ( (1 - FeFP - FeDC) + FeFP/SeFP + FeDC * SeDC )
= 1 / ( ( 1 - .2 - .1 ) + .2/2 + (.1) * (2/3) ) = 1.154.
I hope I did this correctly, but I'm confused about the next part asking what percentage of execution time is spent on floating point operations after implementing the new FP unit?
I know that T[improved ] = T[affected] / improvement factor + T[unaffected]
But I'm unclear how to use it in the context of this problem. Would appreciate all / any advice.
Asked By : user1068636
Answered By : PKG
Since the FP speedup slows down the cache by a factor of $2/3$, the cache is "sped up" by $3/2$. Hence the overall speedup is
$ S = \frac{1}{0.7 + 0.2/2 + 0.1 \times \frac {3}{2}} = 1.05 \equiv 5\%$
The execution times now have the ratio: $0.7:0.1:0.15$ for remaining operations:FP:cache. The percentage time spent on FP now is $\frac{0.1}{0.7+0.1+0.15} = 0.105 \equiv 10.5\%$.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/6200
0 comments:
Post a Comment
Let us know your responses and feedback