Consider two different processors with the same instruction set architecture. Th
ID: 3876539 • Letter: C
Question
Consider two different processors with the same instruction set architecture. There are four types of instructions: ALU,load,store,and branch. The clockrate and CPI of each implementation are given in the following table:
ALU 45% Load 25% Store 20% Branch 10%
(a) Calculate the CPI when running P on each of processor A and B.
(b) Which processor is faster, and by what speedup?
(c) For processor A, if we can choose either load or branch instructions to make twice as fast, which should we choose, and why?
(d) What’s the average MIPS for processor A and B?
Explanation / Answer
Solution:
a)
CPI of processor A:
CPI = 0.45 * 1 + 0.25 * 2 + 0.2 * 3 + 0.1 * 2 = 1.75
CPI of procerssor B:
CPI = 0.45 * 1 + 0.25 * 2 + 0.2 * 2 + 0.1 * 4 = 1.75
b)
Since CPI for both the processor are having same the speed will be controlled by the clock rate of the processors.
we can see that B has 3 Ghz abd A has 2 GHz processor
Now,
CPU time (Processor A) = 1.75 * 1/2 * 10^9 = 0.875 ns
CPU time (Processor B) = 1.75 * 1/3 * 10^9 = 0.58333333275 ns
which means B is 1.5 times faster than processor A.
c)
If we are taking load instruction then effective load will be
2 * 0.25/2 = 0.25
and
effective branch will be
3 * 0.2/ 2 = 0.3
which means load will decrease the overall CPI which, that is why load will be selected.
d)
Average MIPS (Processor A) = 1/0.875 * 10^-9 = 1.14285714286 * 10^9 = 1142.85714286 MIPS
Average MIPS (Processor B) = 1/0.58333333275 * 10^-9 = 1.714285716 * 10^9 = 1714.285716 MIPS
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)