计算机结构与组成习题讲解chapter 1
1.14.4 Find the MFLOPS figures for the programs. MFLOPS = No. FP operations × 10?6/T a: T(P1) = (5 × 105 × 0.75 + 4 × 105 × 1 + 10 × 105 × 1.5)/(4 × 109) = 5.86 × 10–4 s MFLOPS(P1) = 4 × 105 × 10–6/(5.86 × 10–4 ) = 6.82 × 102 T(P2) = (2 × 106 × 1.25 + 2 × 106 × 0.8 + 1 × 106 × 1.25)/(3 × 109) = 1.78 × 10–3 s MFLOPS(P2) = 3 × 105 × 10–6/(1.78 × 10–3) = 1.68 × 102 P Instr. Count No. instructions CPI Clock Rate L/S FP Branch L/S FP Branch a P1 1.00E+06 50% 40% 10% 0.75 1.0 1.5 4 GHz P2 5.00E+06 40% 40% 20% 1.25 0.8 1.25 3 GHz b P1 5.00E+06 30% 30% 40% 1.5 1.0 2.0 4 GHz P2 2.00E+06 40% 30% 30% 1.25 1.0 2.5 3 GHz 1.14.4 Find the MFLOPS figures for the programs. MFLOPS = No. FP operations × 10?6/T b: T(P1) = (1.5 × 106 × 1.5 + 1.5 × 106 × 1 + 2 × 106 × 2)/(4 × 109) = 1.93 × 10–3 s MFLOPS(P1) = 1.5 × 106 × 10–6/(1.93 × 10–3) = 7.7 × 102 T(P2) = (0.8 × 106 × 1.25 + 0.6 × 106 × 1 + 0.6 × 106 × 2.5)/(3 × 109) = 1.03 × 10–3 s MFLOPS(P2) = 0.6 × 106 × 10–6/(1.03 × 10–3) = 5.82 × 102 P Instr. Count No. instructions CPI Clock Rate L/S FP Branch L/S FP Branch a P1 1.00E+06 50% 40% 10% 0.75 1.0 1.5 4 GHz P2 5.00E+06 40% 40% 20% 1.25 0.8 1.25 3 GHz b P1 5.00E+06 30% 30% 40% 1.5 1.0 2.0 4 GHz P2 2.00E+06 40% 30% 30% 1.25 1.0 2.5 3 GHz 1.14.5 Find the MIPS figures for the programs. a: T(P1) = (5 × 105 × 0.75 + 4 × 105 × 1 + 10 × 105 × 1.5)/(4 × 109) = 5.86 × 10–4 (s) CPI(P1) = 5.86 × 10–4 × 4 × 109/106 = 2.27 MIPS(P1) = 4 × 109/(2.27 ×106) = 1.76 × 103 T(P2) = (2 × 106 × 1.25 + 2 × 106 × 0.8 + 1 × 106 × 1.25)/(3 × 109) = 1.78 × 10–3 (s) CPI(P2) = 1.78 × 10–3 × 3 × 109/(5 × 106) = 1.068 (s) MIPS(P2) = 3 × 109/(1.068 × 106) = 2.78 × 103 P Instr. Count No. instructions CPI Clock Rate L/S FP Branch L/S FP Branch a P1 1.00E+06 50% 40% 10% 0.75 1.0 1.5 4 GHz P2 5.00E+06 40% 40% 20% 1.25 0.8 1.25 3 GHz b P1 5.00E+06 30% 30% 40% 1.5 1.0 2.0 4 GHz P2 2.00E+06 40% 30% 30% 1.25 1.0 2.5 3 GHz 1.14.5 Find the MIPS figures for the programs. b. T(P1) = (1.5 × 106 × 1.5 + 1.5