source

01 Introduction And Metrics

Introduction and Metrics

Learning Goals: Understand what computer architecture is, why it matters, and how to rigorously measure and compare performance using standard tools and laws.


What is Computer Architecture?

Computer Architecture = Designing a computer that is well suited for its purpose.

Why Do We Need It?

  1. Improve performance
  2. Improve capabilities of the computer

Designing for the Future

Computer architects must be aware of trends and design for the future. Because product development takes years, if you design for today’s technology, the product will be obsolete by launch.


Moore’s Law

Every 18–24 months, techniques allow twice as many transistors on the same chip area.

By extension:

  1. Processor speed doubles every 18–24 months
  2. Energy per operation is halved every 18–24 months
  3. Memory capacity doubles every 18–24 months

Moore’s Law in Practice

With Moore’s Law, a designer can either:

  1. Reduce cost — make the same processor in a smaller area (cheaper)
  2. Improve performance — use the same area to make a better processor

The Memory Wall

While processor speed and memory capacity have followed Moore’s Law, memory latency has only improved ~1.1× every 2 years.

Mitigation: Caches are used to bridge the gap between fast processors and slow memory.


Power Consumption

Processor performance is usually discussed in terms of speed, but power and fabrication cost are equally important design constraints.

Dynamic Power (Active Power)

P=12CV2fαP = \frac{1}{2} C \cdot V^2 \cdot f \cdot \alpha

SymbolMeaning
CCapacitance
VPower supply voltage
fClock frequency
αActivity factor

Static Power (Leakage Power)

Key insight: Static power prevents lowering the voltage indefinitely.


Fabrication Cost

Fabrication Yield = (# working chips) / (# chips on wafer)


Performance Metrics

Speed Dimensions

Note: Throughput ≠ 1/Latency in general (e.g., pipelined systems)

Speedup

“X is N times faster than Y”:

Speedup=N=Speed(X)Speed(Y)=Throughput(X)Throughput(Y)=Latency(Y)Latency(X)\text{Speedup} = N = \frac{\text{Speed}(X)}{\text{Speed}(Y)} = \frac{\text{Throughput}(X)}{\text{Throughput}(Y)} = \frac{\text{Latency}(Y)}{\text{Latency}(X)}

Performance ∝ 1 / Latency


Benchmarks

A benchmark is a standard suite of programs representing common tasks, used to compare processor performance fairly.

Types of Benchmarks

TypeRealismEase of SetupUse Case
Real ApplicationsHighestHardestReal machine comparisons
KernelsHighHardPrototypes
SyntheticMediumEasyDesign studies
Peak PerformanceEasyMarketing

Summarizing Benchmark Results

Geometric Mean=(i=1ntermi)1/n\text{Geometric Mean} = \left(\prod_{i=1}^{n} \text{term}_i\right)^{1/n}


Iron Law of Performance

CPU Time=InstructionsProgram×CyclesInstruction×TimeCycle\text{CPU Time} = \frac{\text{Instructions}}{\text{Program}} \times \frac{\text{Cycles}}{\text{Instruction}} \times \frac{\text{Time}}{\text{Cycle}}

All three factors matter:

FactorInfluenced By
# InstructionsAlgorithm, compiler, instruction set
CPI (Cycles per Instruction)Instruction set, processor design
Clock Cycle TimeProcessor design, circuit design, transistor physics

Computer architects control the instruction set and processor design.

Iron Law for Unequal Instruction Times

CPU Time=[iInstiProgram×CyclesInsti]×TimeCycle\text{CPU Time} = \left[\sum_i \frac{\text{Inst}_i}{\text{Program}} \times \frac{\text{Cycles}}{\text{Inst}_i}\right] \times \frac{\text{Time}}{\text{Cycle}}


Amdahl’s Law

Used when only a fraction of the system is improved:

Speedup=1(1F)+FSE\text{Speedup} = \frac{1}{(1 - F) + \frac{F}{S_E}}

Implications

Make the Common Case Fast: Small improvements to a large fraction of execution time yield more benefit than large improvements to a small fraction.

Lhadma’s Law: While making the common case fast, do not make the uncommon case worse.

Diminishing Returns: After the easy optimizations are made, further improvements yield smaller and smaller speedups.


Summary

Key Takeaways:

See Also: 02-Pipelining-and-Hazards Next: 02-Pipelining-and-Hazards