Given four types of instructions A, B, C, and D, and their CPIs and incidence fi
ID: 3881597 • Letter: G
Question
Given four types of instructions A, B, C, and D, and their CPIs and incidence figures as described in the table below
Instruction Type CPI for this Type Instruction Count
A 1.6 345
B 1.8 246
C 2.7 858
D 3.0 124
(a) calculate average CPI
(b) calculate average CPI if Type B instructions are speeded up by 47 percent.
Explanation / Answer
Given,
Instruction Type
CPI for this Type
Instruction Count
A
1.6
345
B
1.8
246
C
2.7
858
D
3.0
124
a)
As, Average CPI = CPU clock cycles / Instruction count
CPU clock cycles = (CPI * Instruction count)
= (1.6 * 345) + (1.8 * 246) + (2.7 * 858) + (3.0 * 124)
= 552 + 442.8 + 2316.6 + 372
= 3683.4
Total Instruction count = (Instruction count)
= 345 + 246 + 858 + 124
= 1573
Now,
Average CPI = CPU clock cycles / Instruction count = 3683.4 / 1573 = 2.34
b)
As, Speed up = old execution time / new execution time
= (CPIB * IB) old / (CPIB * IB) new
Given, Type B instructions are speeded up by 47 percent i.e., if initial speed is 100 than now its 147.
Thus speed up is 147/100 = 1.47.
i.e., Speed up = (CPIB * IB) old / (CPIB * IB) new = 1.47
=> (CPIB * IB) new = (CPIB * IB) old / 1.47 = (1.8 * 246) / 1.47 = 442.8 / 1.47 = 301.22
As,
Average CPI = CPU clock cycles / Instruction count
CPU clock cycles = (CPI * Instruction count)
= 552 + 301.22 + 2316.6 + 372
= 3541.82
Total Instruction count = (Instruction count)
= 345 + 246 + 858 + 124
= 1573
Now,
Average CPI = CPU clock cycles / Instruction count = 3541.82 / 1573 = 2.25
Instruction Type
CPI for this Type
Instruction Count
A
1.6
345
B
1.8
246
C
2.7
858
D
3.0
124
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.