45.6k views
4 votes
Consider two different machines, with two different instruction sets, both of which have a clock rate of 200 MHz. The following measurements are recorded on the two machines running a given set of benchmark programs:Instruction Type Instruction Count (millions) Cycles per Instruction Machine A Arithmetic and logic 8 1Load and store 4 3Branch 2 4Others 4 3 Machine BArithmetic and logic 10 1Load and store 8 2Branch 2 4Others 4 3(a) Determine the effective CPI, MIPS rate, and execution time for each machine. (b) Comment on the results.

2 Answers

6 votes

Final answer:

The effective CPI, MIPS rate, and execution time for each machine are calculated. Both machines have similar performance with minor variations.

Step-by-step explanation:

(a) Effective CPI:

For Machine A:

Effective CPI = (Cycles per Instruction * Instruction Count) / 106

Effective CPI = ((1*8) + (3*4) + (4*2) + (3*4)) / 106

Effective CPI = 0.000058

For Machine B:

Effective CPI = ((1*10) + (2*8) + (4*2) + (3*4)) / 106

Effective CPI = 0.000062

MIPS rate:

MIPS = Clock rate (Hz) / (Cycles per Instruction * 106)

MIPS for Machine A = 200 MHz / (0.000058 * 106)

MIPS for Machine A = 3.4482

MIPS for Machine B = 200 MHz / (0.000062 * 106)

MIPS for Machine B = 3.2258

Execution time:

Execution time = (Instruction Count * Cycles per Instruction) / Clock rate

Execution time for Machine A = (18 * 106) / (200 * 106)

Execution time for Machine A = 0.09 seconds

Execution time for Machine B = (24 * 106) / (200 * 106)

Execution time for Machine B = 0.12 seconds

(b) Comment: Machine A has a slightly lower effective CPI and a slightly higher MIPS rate than Machine B. However, Machine B has a slightly longer execution time compared to Machine A. Overall, both machines have similar performance with minor variations.

User Ronen Ariely
by
5.0k points
2 votes

Answer:

(A) CPIₐ = 2.22, MIPSₐ = 90, CPUₐ = 0.2 s

CPIₙ = 1.92, MIPSₙ, CPUₙ = 0.23 s

(B) Even though machine B has a higher MIPS than machine A, it needs a longer CPU time to execute the similar set of benchmark programs instructions.

Step-by-step explanation:

To start with, we solve for CPI ∨ A,

Where ∨ = superscript

CPIₙ = Machine B, that is (ₙ = B),

Therefore,

a) CPIₐ = Σ CPI ∨i × I ∨i ÷ I ∨c

= (8 × 1 + 4 × 3 + 2 ×4 + 4 × 3 ) × 10 ⁶ ÷ ( 8 +4 +2+4) × 10 ⁶

2.22

MIPSₐ = f / CPIₐ × 10 ⁶ = 200 × 10 ⁶ ÷ 2.22 × 10 ⁶

≈ 90

CPUₐ = I ∨c × CPIₐ ÷ f

= 18 × 10 ⁶ × 2.2 ÷ 200 × 10 ⁶

= 0.2 s

CPIₙ = Σ CPI ∨i × I ∨i ÷ I ∨c

= (10 × 1 + 8 × 2 + 2 × 4 + 4 × 3) × 10 ⁶ ÷ (10 + 8+ 2 + 4) × 10 ⁶

≈ 1.92

MIPSₙ = f / CPIₙ × 10 ⁶ = 200 × 10 ⁶ / 1.92 × 10 ⁶

= 104

CPUₙ = I ∨c × CPIₙ ÷ f

=24 × 10 ⁶ × 1.92 ÷ 200 × 10 ⁶

0.23 S

b) Even though machine B has a higher MIPS than machine A, it needs a longer CPU time to execute the similar set of benchmark programs instructions.

User Apropos
by
5.6k points