Answer for homework assignment 1 of Computer Architecture

advertisement
Answer for homework assignment 1 of Computer Architecture
3rd
1.1
Edition part :
a) ( 10 points)
1
speedup = -------------------(1-f ) + f / 20
b) (10 points)
If we want to achieve a speedup of 2,
then from
c)
Speedup_10
20.00
15.00
1
2 = -------------------(1-f ) + f / 20
we can calculate the f.
Speedup_20
25.00
10.00
f =52.6%.
(10 points)
5.00
0.00
If we want to achieve one-half the
0
0.2
0.4
0.6
maximum speedup, which equals 10, then
1
10 = -------------------(1-f ) + f / 20
the percentage of vectorization must be 94.7%.
d)
(20 points)
What should we do is to compare the two solutions of
performance enhancement.
1)
Hardware solution: to increase the S from 20 to 40.
2) Software method: to increase the F.
If the percentage of vectorization is now known as 70%, then
from the hardware solution we can achieve the
1
speedup = -------------------------(1-70% ) + 70% /40 .
If we want to achieve the same speedup as that from hardware
solution, the compiler should increase the use of vector mode. So
we get the equation as following.
1
1
-------------------- = ------------------------(1-f ) + f /20
(1-70% ) + 70% /40
From the equation above , the f can be calculated.
F =71.8%.
0.8
0.95
Because it is more difficult to double the speed of the vector
hardware than to increase the percentage of vectorization by
1.8%, it is better to adopt the software method.
4th
Edition part :
1.13
a) (10 points)
Pentium4 570:
1/(0.4 *3501 + 0.6 * 11210 ) =1.23*10-4
Athlon64*2 4800+:
1/(0.4* 3423 + 0.6* 20718) = 7.25*10-5
b) (10 points)
speedup = PAthlon 64*2 4800 / PPenium 4 570
speedup =
c)
20718 / 11210 = 1.85
(10 points)
(1- f) * 3501 + f *11210 = (1-f) 3000 + f15220
f = 11%;
1-f = 89%
Memory-intensive: 89%,
CPU-intensive: 11%
1. 14
a)
(5 points )
1/ ( 0.6 + 0.4/2 ) = 1,25
b)
(5 points)
1/ (0.01 + 0.99/2 ) = 1.98
c)
(5 points)
1 / ( 0.2 + 0.8/1.25) = 1.19
d)
(5 points)
1 / ( 0.8 + 0.2/1.98) = 1.11
Download