Consider a program written in high level programming language is executed separately on two processors with different instruction set architectures. Processor A executes 10 billion instructions with clock rate 4GHz and CPI 1.0. Processor B executes 8 billion instructions with the same clock rate but CPI 1.1. (a) Find the MIPS rates of those processors. (4 分) (b) Find the total execution time for each of the processors. (4 分) (c) Compare their performance. (2 分)
(a) MIPS = clock rate ÷ (CPI × \(10^6\))
A:\(\dfrac{4\times10^{9}}{1.0\times10^{6}}=4000\) B:\(\dfrac{4\times10^{9}}{1.1\times10^{6}}\approx3636\)
A = 4000 MIPS,B ≈ 3636 MIPS
(b) time = IC × CPI ÷ clock rate
A:\(\dfrac{10\times10^{9}\times1.0}{4\times10^{9}}=2.5\) s B:\(\dfrac{8\times10^{9}\times1.1}{4\times10^{9}}=2.2\) s
A = 2.5 s,B = 2.2 s
(c) 同一支程式,B 的時間短:\(\dfrac{2.5}{2.2}\approx1.14\)
A 的 MIPS 較高但比較慢:指令集不同、同一程式的指令數不同,MIPS 不能拿來比效能
B 比 A 快約 1.14 倍