Docsity

Computer Architecture: Performance and Design Principles, Lecture notes of Computer Architecture and Organization

Partial preview of the text

Download Computer Architecture: Performance and Design Principles and more Lecture notes Computer Architecture and Organization in PDF only on Docsity!

Inf3 Computer Architecture - 2015-2016 (^1)

Summary: Computer Architecture

What is Computer Architecture?

Computer Architecture:

**- ISA

  • Microarchitecture
  • Hardware implementation Operating System (OS) Technology** (^) Logic design Programming Languages Compilers Applications Users

Metrics of interest for computer architects

  • Performance
  • Cost
  • Reliability
  • Power
  • Area

Inf3 Computer Architecture - 2015-2016 (^2)

Performance of Computer Architectures

▪ Metrics:

  • Execution time, response time: overall time for a given computation (e.g. full program execution, one transaction)
  • Latency: time to complete a given task (e.g. memory latency, I/O latency, instruction latency)
  • Bandwidth, throughput: rate of completion of tasks (e.g. memory bandwidth, transactions per second, MIPS, FLOPS)

▪ MHz, MIPS, FLOPS: must use with caution

▪ Benchmarking:

  • toy benchmarks, synthetic benchmarks, kernels, real programs,
  • Input sets
  • E.g. SPECint, SPECfp, EEMBC Coremark

Inf3 Computer Architecture - 2015-

Improving Performance: Principles of CA Design

▪ Take advantage of parallelism

  • System level: multiple processors, multiple disks
  • Processor level: pipelining, superscalar issue
  • Circuit level: carry-lookahead ALU

▪ Principle of locality

  • Spatial and Temporal Locality
  • 90% of program executing in 10% of code
  • E.g. Caches

▪ Focus on the common case

  • Amdahl’s law, CPU Performance equation
  • E.g. RISC design principle 4

Inf3 Computer Architecture - 2013-

Amdahl’s Law

5

Inf3 Computer Architecture - 2013-

Amdahl’s Law - Example

7

Inf3 Computer Architecture - 2015-

Factors that affect CPU performance

Instruction count (IC)

  • Compiler, ISA

Cycles per instruction (CPI)

  • ISA, microarchitecture

Clock time (1/f)

  • Microarchitecture, technology 8 What determines these factors?

Inf3 Computer Architecture - 2015-2016 (^10)

Examples

  • Branch instructions take 2 cycles, all other instructions take 1 cycle
  • CPU A uses extra compare instruction per branch
  • Clock frequency of CPU A is 1.25 times faster than CPU B
  • On A 20% of instructions are branches (thus other 20% are compare instructions) **Example: Find the CPU time CPIA = IC CPIbranch x ICbranch

IC CPIothers x ICothers = 2 x 0.2 + 1 x 0.8 = 1. CPIB = IC CPIbranch x ICbranch

IC CPIothers x ICothers = 2 x 0.25 + 1 x 0.75 = 1. CPU time** (^) B = ICB x CPIB x Clock time (^) B = 0.8 x ICA x 1.25 x (1.25 x Clock timeA) = 1.25 x ICA x Clock time (^) A CPU time (^) A = ICA x CPIA x Clock time (^) A = ICA x 1.2 x Clock time (^) A CPU A is faster!

Inf3 Computer Architecture - 2015-2016 (^11)

Improving CPU Performance

IC:
  • Compiler optimizations (constant folding, constant propagation)
  • ISA (More complex instructions) CPI:
  • Microarchitecture (Pipelining, Out-of-order execution, branch prediction)
  • Compiler (Instruction scheduling)
  • ISA (Simpler instructions) Clock period:
  • Hardware (Smaller transistors – Moore’s law)
  • ISA (Simple instructions that can be easily decoded)
  • Microarchitecture (Simple architecture)