Professional Documents
Culture Documents
Tutorial 1 Solutions
Tutorial 1 Solutions
Tutorial 1 Solutions
Indian Institute of Technology Kharagpur
Probable Solutions
1. Let us denote
n × CP IxM1 + n × CP IyM1
= 10 (1)
2n
Average CPI on M2 for B1 can be expressed as:
n × CP IxM2 + n × CP IyM2
= 10 (2)
2n
Equation (1) and (2) can be simplified to
After replacing half of the class X instructions with class Y instructions (suite B2 ), average CPI on
M1 can be expressed as
( n2 × CP IxM1 + n
2 × CP IyM1 ) + n × CP IyM1
(5)
2×n
and average CPI on M2 can be expressed as
( n2 × CP IxM2 + n
2 × CP IyM2 ) + n × CP IyM2
(6)
2×n
It is given that M1 ’s running time is 80% of M2 . Therefore, we can relate these two average CPIs as
( n2 × CP IxM1 + n
2 × CP IyM1 ) + n × CP IyM1 ( n × CP IxM2 + n
× CP IyM2 ) + n × CP IyM2
= 0.8 × 2 2
2×n 2×n
(7)
This can be simplified to
Tutorial 1 Solutions
n × CP IxM1 + ( n2 × CP IxM1 + n
2 × CP IyM1 )
(9)
2×n
and average CPI on M2 can be expressed as
n × CP IxM2 + ( n2 × CP IxM2 + n
2 × CP IyM2 )
(10)
2×n
It is given that M1 ’s running time is 1.4 times of M2 . Therefore, we can relate these two quantities as
n × CP IxM1 + ( n2 × CP IxM1 + n
2 × CP IyM1 ) n × CP IxM2 + ( n2 × CP IxM2 + n
2 × CP IyM2 )
= 1.4 ×
2×n 2×n
(11)
This can be simplified to
Solve the 4-variable system of equations formed by Equations (3), (4), (8) and (12). This gives the
required CPIs
2. (a) Here, 70% of the computation time can be used by the floating-point processor. Hence, Fenh = 0.7.
The speedup of the floating-point processor is 30% faster. Hence, Senh = 1.3. Thus, according to
Amdahl’s Law,
1
Overall Speedup =
(1 − Fenh ) + FSenh
enh
1
=
(1 − 0.7) + 0.7
1.3
1
=
0.3 + 0.538
= 1.19
(b) Take Cost/Speedup ratio to quantitatively compare between the two options. We will select
the Option having lower value of this ratio.
2
Tutorial 1 Solutions
Option 1: Here, 80% of the computation time can be used by the floating-point processor.
Hence, Fenh = 0.8. Senh = 1.3 as before. Thus, according to Amdahl’s Law,
1
Overall Speedup =
(1 − Fenh ) + FSenh
enh
1
=
(1 − 0.8) + 0.8
1.3
1
=
0.2 + 0.615
= 1.22
1
=
(1 − 0.6) + 0.6
2
1
=
0.4 + 0.3
= 1.42
3
Tutorial 1 Solutions