Professional Documents
Culture Documents
Chapter 1
Fundamentals
Chapter 1 - Fundamentals 1
Introduction
1.1 Introduction
1.2 The Task of a Computer Designer
1.3 Technology and Computer Usage Trends
1.4 Cost and Trends in Cost
1.5 Measuring and Reporting Performance
1.6 Quantitative Principles of Computer Design
1.7 Putting It All Together: The Concept of Memory Hierarchy
Chapter 1 - Fundamentals 2
Art and
Architecture
Lyonel Feininger,
Marktkirche in Halle
Chapter 1 - Fundamentals 3
Art and Architecture
Notre Dame
de Paris
Chapter 1 - Fundamentals 5
What’s Computer Architecture?
• 1950s to 1960s: Computer Architecture Course
Computer Arithmetic.
• 1970s to mid 1980s: Computer Architecture Course
Instruction Set Design, especially ISA appropriate for
compilers. (What we’ll do in Chapter 2)
• 1990s to 2000s: Computer Architecture Course
Design of CPU, memory system, I/O system,
Multiprocessors. (All evolving at a tremendous rate!)
Chapter 1 - Fundamentals 6
The Task of a
Computer Designer
1.1 Introduction
1.2 The Task of a Computer
Designer
1.3 Technology and Computer
Usage Trends Evaluate Existing
1.4 Cost and Trends in Cost Implementation Systems for
1.5 Measuring and Reporting Complexity Bottlenecks
Performance
1.6 Quantitative Principles of
Computer Design Benchmarks
1.7 Putting It All Together: The
Concept of Memory Technology
Hierarchy Trends
Implement Next
Simulate New
Generation System
Designs and
Organizations
Workloads
Chapter 1 - Fundamentals 7
Technology and
Computer Usage Trends
1.1 Introduction
1.2 The Task of a Computer Designer When building a Cathedral numerous
1.3 Technology and Computer Usage very practical considerations need to
Trends
be taken into account:
1.4 Cost and Trends in Cost
1.5 Measuring and Reporting Performance
• available materials
1.6 Quantitative Principles of Computer • worker skills
Design
• willingness of the client to pay the
1.7 Putting It All Together: The Concept of
Memory Hierarchy
price.
Chapter 1 - Fundamentals 8
Trends
Gordon Moore (Founder of Intel) observed in 1965 that the number of
transistors that could be crammed on a chip doubles every year.
This has CONTINUED to be true since then.
Transistors Per Chip
1.E+08
Pentium 3
Pentium Pro
1.E+07 Pentium II
Pentium Power PC G3
80286
1.E+05
8086
1.E+04
4004
1.E+03
1970 1975 1980 1985 1990 1995 2000 2005
Chapter 1 - Fundamentals 9
Trends
Processor performance, as measured by the SPEC benchmark has
also risen dramatically.
5000
Alpha 6/833
4000
3000
2000
DEC Alpha 5/500
DEC
1000 Sun MIPS
IBM AXP/
RS/ 500 DEC Alpha 4/266 DEC Alpha 21264/600
-4/ M
6000
0 260 2000
2000
87
88
89
90
91
92
93
94
95
96
97
98
99
Chapter 1 - Fundamentals 10
Trends
Memory Capacity (and Cost) have changed dramatically in the last
20 years.
size
1000000000
1986 1 190 ns
100000 1989 4 165 ns
1992 16 145 ns
10000
1996 64 120 ns
1000 2000 256 100 ns
1970 1975 1980 1985 1990 1995 2000
Year
Chapter 1 - Fundamentals 11
Trends
Based on SPEED, the CPU has increased dramatically, but memory
and disk have increased only a little. This has led to dramatic
changed in architecture, Operating Systems, and Programming
practices.
Chapter 1 - Fundamentals 12
Measuring And
Reporting Performance
1.1 Introduction
1.2 The Task of a Computer Designer
1.3 Technology and Computer Usage
Trends
1.4 Cost and Trends in Cost
1.5 Measuring and Reporting Performance This section talks about:
1.6 Quantitative Principles of Computer
Design
1. Metrics – how do we describe
1.7 Putting It All Together: The Concept of
Memory Hierarchy in a numerical way the
performance of a computer?
Chapter 1 - Fundamentals 13
Metrics
Throughput
Plane DC to Paris Speed Passengers
(pmph)
BAD/Sud
3 hours 1350 mph 132 178,200
Concodre
ExTime(Y) Performance(X)
--------- = ---------------
ExTime(X) Performance(Y)
Chapter 1 - Fundamentals 15
Metrics - Comparisons
Pat has developed a new product, "rabbit" about which she wishes to determine
performance. There is special interest in comparing the new product, rabbit to the
old product, turtle, since the product was rewritten for performance reasons. (Pat
had used Performance Engineering techniques and thus knew that rabbit was
"about twice as fast" as turtle.) The measurements showed:
Performance Comparisons
Product Transactions / second Seconds/ transaction Seconds to process transaction
Turtle 30 0.0333 3
Rabbit 60 0.0166 1
Which of the following statements reflect the performance comparison of rabbit and
turtle?
o Rabbit is 100% faster than turtle. o Rabbit takes 200% less time than turtle.
o Rabbit is twice as fast as turtle. o Turtle is 50% as fast as rabbit.
o Rabbit takes 1/2 as long as turtle. o Turtle is 50% slower than rabbit.
o Rabbit takes 1/3 as long as turtle. o Turtle takes 200% longer than rabbit.
o Rabbit takes 100% less time than turtle. o Turtle takes 300% longer than rabbit.
Chapter 1 - Fundamentals 16
Metrics - Throughput
Application Answers per month
Operations per second
Programming
Language
Compiler
(millions) of Instructions per second: MIPS
ISA (millions) of (FP) operations per second:
MFLOP/s
Datapath
Control Megabytes per second
Function Units
Transistors Wires Pins Cycles per second (clock rate)
Chapter 1 - Fundamentals 17
Methods For Predicting
Performance
• Benchmarks, Traces, Mixes
• Hardware: Cost, delay, area, power estimation
• Simulation (many levels)
– ISA, RT, Gate, Circuit
• Queuing Theory
• Rules of Thumb
• Fundamental “Laws”/Principles
Chapter 1 - Fundamentals 18
Benchmarks
SPEC: System Performance Evaluation
Cooperative
• First Round 1989
– 10 programs yielding a single number (“SPECmarks”)
• Second Round 1992
– SPECInt92 (6 integer programs) and SPECfp92 (14 floating point programs)
• Compiler Flags unlimited. March 93 of DEC 4000 Model 610:
spice: unix.c:/def=(sysv,has_bcopy,”bcopy(a,b,c)=
memcpy(b,a,c)”
wave5: /ali=(all,dcom=nat)/ag=a/ur=4/ur=200
nasa7: /norecu/ag=a/ur=4/ur2=200/lc=blas
• Third Round 1995
– new set of programs: SPECint95 (8 integer programs) and SPECfp95 (10 floating
point)
– “benchmarks useful for 3 years”
– Single flag setting for all programs: SPECint_base95, SPECfp_base95
Chapter 1 - Fundamentals 19
Benchmarks
CINT2000 (Integer Component of SPEC CPU2000):
http://www.spec.org/osg/cpu2000/CFP2000/
Chapter 1 - Fundamentals 21
Benchmarks Sample Results For
SpecINT2000
http://www.spec.org/osg/cpu2000/results/res2000q3/cpu2000-20000718-00168.asc
Chapter 1 - Fundamentals 23
Benchmarks
How to Summarize Performance
Management would like to have one number.
Technical people want more:
1. They want to have evidence of reproducibility – there should be enough
information so that you or someone else can repeat the experiment.
2. There should be consistency when doing the measurements multiple
times.
Program P1 (secs) 1 10 20
Chapter 1 - Fundamentals 24
Quantitative Principles
of Computer Design
1.1 Introduction
1.2 The Task of a Computer Designer
1.3 Technology and Computer Usage
Trends
1.4 Cost and Trends in Cost
Make the common case fast.
1.5 Measuring and Reporting Performance Amdahl’s Law:
1.6 Quantitative Principles of Computer Relates total speedup of a
Design
system to the speedup of some
1.7 Putting It All Together: The Concept of
Memory Hierarchy portion of that system.
Chapter 1 - Fundamentals 25
Quantitative Amdahl's Law
Design
Speedupenhanced
1
ExTimeold
Speedupoverall = =
(1 - Fractionenhanced) + Fractionenhanced
ExTimenew
Speedupenhanced
Chapter 1 - Fundamentals 27
Quantitative Amdahl's Law
Design
• Floating point instructions improved to run 2X; but only
10% of actual instructions are FP
Speedupoverall = 1 = 1.053
0.95
Chapter 1 - Fundamentals 28
Quantitative Cycles Per
Design Instruction
CPI = (CPU Time * Clock Rate) / Instruction Count
= Cycles / Instruction Count
n
CPU _ Time Cycle _ Time * CPI i * I i
i 1
“Instruction Frequency” Number of
instructions of
type I.
n
CPI CPI i * Fi where Fi Ii
Instruction _ Count
i 1
Chapter 1 - Fundamentals 29
Quantitative Cycles Per
Design Instruction
Suppose we have a machine where we can count the frequency with which
instructions are executed. We also know how many cycles it takes for
each instruction type.
Chapter 1 - Fundamentals 31
The Concept of
Memory Hierarchy
1.1 Introduction
1.2 The Task of a Computer Designer
1.3 Technology and Computer Usage
Trends
1.4 Cost and Trends in Cost Fast memory is expensive.
1.5 Measuring and Reporting Performance
1.6 Quantitative Principles of Computer
Design Slow memory is cheap.
1.7 Putting It All Together: The Concept of
Memory Hierarchy
The goal is to minimize the
price/performance for a
particular price point.
Chapter 1 - Fundamentals 32
Memory Hierarchy
Level 1 Level 2
Registers Memory Disk
cache Cache
Chapter 1 - Fundamentals 33
Memory Hierarchy
• Hit: data appears in some block in the upper level (example:
Block X)
– Hit Rate: the fraction of memory access found in the upper level
– Hit Time: Time to access the upper level which consists of
RAM access time + Time to determine hit/miss
• Miss: data needs to be retrieve from a block in the lower level
(Block Y)
– Miss Rate = 1 - (Hit Rate)
– Miss Penalty: Time to replace a block in the upper level +
Time to deliver the block the processor
• Hit Time << Miss Penalty (500 instructions on 21264!)
Chapter 1 - Fundamentals 34
Memory Hierarchy
Level 1 Level 2
Registers Memory Disk
cache Cache
Chapter 1 - Fundamentals 35
Wrap Up
1.1 Introduction
1.2 The Task of a Computer Designer
1.3 Technology and Computer Usage Trends
1.4 Cost and Trends in Cost
1.5 Measuring and Reporting Performance
1.6 Quantitative Principles of Computer Design
1.7 Putting It All Together: The Concept of Memory Hierarchy
Chapter 1 - Fundamentals 36