In: Computer Science
Assume that a machine includes a floating point (FP) unit, which contains an FP square root
(FPSQR) instruction. Suppose we have the following measurements. Frequency of FP operations = 20%, Frequency of FPSQR = 4% Average CPI of FP operations = 4.0, CPI of FPSQR = 20
Average CPI of other instructions (non-FP instructions) = 1.4
What is the average CPI of the machine?
If the average CPI of FP is decreased to 3, what is the average CPI of the new machine?
If the CPI of FPSQR is decreased to 2, what is the average CPI of the new machine?
Which design improvement is better of b and c?
SOLUTION-
Given,
Frequency of FP operations =20%,
Frequency of FPSQR = 4%
Average CPI of FP operations = 4.0,
CPI of FPSQR=20
Average CPI of other instructions(no-FP instructions) = 1.4
100 - 20 (Freq FP ) = 80 (Freq
non-FP)
(a) What is the average CPI of the machine?
Answer:
CPI machine= (CPI FP ∗ Freq FP) +
(CPI non−FP ∗ Freq non−FP)
= (4.0∗20%) + (1.4∗80)
= (4.0∗0.2) + (1.4∗0.8)
= 0.8 + 1.92
= 2.72 (Average CPI original)
(b) If the average CPI of FP is decreased to 3, what is
the average CPI of the new machine?Answer:
CPI new = CPI avg − Freq FP ∗ (CPI
FP − CPI FPnew)
= 2.72 − 20 ∗ (4−3)
= 2.72 − 0.2 ∗ (4−3)
= 2.72 - 0.2 * 1
= 2.52 (CPI new average)
(c) If the CPI of FPSQR is decreased to 2, what is the
average CPI of the new machine?Answer:
CPI new=CPI avg−Freq FPSQR∗(CPI
FPSQR−CPI FPSQRnew)
= 2.72 − 4 ∗ (20−2)
= 2.72 − 0.04 (18)
= 2.72 − 0.72
= 2 (CPI new average)
(d) Which design improvement is better of b and c?
Answer:
Speed FP = CPI avg / CPI
new
= 2.72 / 2.52
= 1.07
Speed FP = CPI avg / CPI
new
= 2.72 / 2
= 1.36
So we can say that B is a better improvement.
IF YOU HAVE ANY DOUBT PLEASE COMMENT DOWN BELOW I
WILL SOLVE IT FOR YOU:)
----------------PLEASE RATE THE ANSWER-----------THANK
YOU!!!!!!!!----------