Computer Architecture Measurement
Computer Architecture Measurement
BAC/Sud BAC/Sud
Concorde Concorde
Douglas Douglas
DC-8-50 DC-8-50
BAC/Sud BAC/Sud
Concorde Concorde
Douglas DC- Douglas DC-
8-50 8-50
❑ Throughput
➢ Total work done per unit time e.g., tasks/transactions/… per hour
❑ Sequence 1: IC = 5 ❑ Sequence 2: IC = 6
❑ Clock Cycles ❑ Clock Cycles
= 2×1 + 1×2 + 2×3 = 4×1 + 1×2 + 1×3
= 10 =9
❑ Avg. CPI = 10/5 = 2.0 ❑ Avg. CPI = 9/6 = 1.5
❑ Performance depends on
➢ Algorithm: affects IC, possibly CPI
➢ Programming language: affects IC, CPI
➢ Compiler: affects IC, CPI
➢ Instruction set architecture: affects IC, CPI, Clock cycle time
Performance Example 1
❑ Suppose we have two implementations of the same ISA for a
given program. Which one is faster and by how much?
Machine Clock cycle CPI
A 250 (ps) 2.0
B 500 (ps) 1.2
❑ Solution:
CPU Time = Instruction Count CPI Cycle Time
A A A
= I 2.0 250ps = I 500ps
CPU Time = Instruction Count CPI Cycle Time
B B B A is faster…
= I 1.2 500ps = I 600ps
CPU Time
B = I 600ps = 1.2
…by this much
CPU Time I 500ps
A
Performance Example 2
❑ Given: instruction mix of a program on a computer
Classi Freqi CPIi
ALU 50% 1
Load 20% 5
Store 10% 3
Branch 20% 2
➢ What is average CPI? What is the % of time used by each instruction class?
➢ How faster would the machine be if load time is 2 cycles? What if two ALU
instructions could be executed at once?
❑ Solution:
➢ Average CPI = 0.5x1+0.2x5+0.1x3+0.2x2 = 2.2. Time percentages: 23%, 45%,
14%, 18%.
𝑜𝑙𝑑 𝐶𝑃𝑈 𝑡𝑖𝑚𝑒 𝑜𝑙𝑑 𝐶𝑃𝐼 2.2
➢ If load time is 2 cycles: = = = 1.38
𝑛𝑒𝑤 𝐶𝑃𝑈 𝑡𝑖𝑚𝑒 𝑛𝑒𝑤 𝐶𝑃𝐼 1.6
𝑜𝑙𝑑 𝐶𝑃𝐼 2.2
➢ If two ALU instructions could be executed at once: = = 1.13
𝑛𝑒𝑤 𝐶𝑃𝐼 1.95
Performance - clock rate relation
❑ In CMOS IC technology:
➢ Power = Pstatic (~40%, due to leakage) + Pdynamic (~60%, due to capacitance
charging when signals change between 0 and 1).
12
➢ 𝑃𝑑𝑦𝑛𝑎𝑚𝑖𝑐 = 𝐶𝑉𝐷𝐷 𝑓 → raising clock rate increases power consumption.
2
1
𝑆𝑝𝑒𝑒𝑑𝑢𝑝 𝐸 =
𝑓
𝑠 + 1−𝑓
Implication of Amdahl’s law on multi-
core performance
MIPS as a Performance Metric
❑ MIPS: Millions of Instructions Per Second
➢ Faster machine ⇒ larger MIPS
➢ Relations to previous performance measures
Instructio n count
MIPS =
Execution time 10 6
Instructio n count Clock rate
= =
Instructio n count CPI CPI 10 6
10 6
Clock rate
➢ Similar concept: MFLOPS = millions of floating point operations per second