Lectures for 2nd Edition

Download Report

Transcript Lectures for 2nd Edition

Computer Organization
and Design
David. Paterson and John L. Hennessy
2004 Morgan Kaufmann Publishers
1
Outlile
•
•
•
•
•
•
•
(1)Computer Abstractions and Technology (第一週)
(2)Instructions:Language of the computer (第二、三週)
(3)Arithmetic for computer (第四、五週)
(4)Assessing and understanding performance (第六、七週)
(5)The processor:Datapath and Control (第八、九週)
(6)Enhancing performance with pipelining (第十、十一週)
(7)Large and Fast:Exploiting memory Hierarchy (第十二、
十三週)
• (8)Storage, Network, and other peripherals (第十四、十五週)
2004 Morgan Kaufmann Publishers
2
Chapter 1
2004 Morgan Kaufmann Publishers
3
Introduction
•
This course is all about how computers work
•
But what do we mean by a computer?
– Different types: desktop, servers, embedded devices
– Different uses: automobiles, graphics, finance, genomics…
– Different manufacturers: Intel, Apple, IBM, Microsoft, Sun…
– Different underlying technologies and different costs!
•
Analogy: Consider a course on “automotive vehicles”
– Many similarities from vehicle to vehicle (e.g., wheels)
– Huge differences from vehicle to vehicle (e.g., gas vs. electric)
•
Best way to learn:
– Focus on a specific instance and learn how it works
– While learning general principles and historical perspectives
2004 Morgan Kaufmann Publishers
4
FIGURE 1.1 The number of distinct processors sold
between 1998 and 2002
2004 Morgan Kaufmann Publishers
5
FIGURE 1.2 Sales of microprocessors between 1998 and
2002 by instruction set architecture combining all uses.
2004 Morgan Kaufmann Publishers
6
Why learn this stuff?
•
You want to call yourself a “computer scientist”
•
You want to build software people use (need performance)
•
You need to make a purchasing decision or offer “expert” advice
•
Both Hardware and Software affect performance:
– Algorithm determines number of source-level statements
– Language/Compiler/Architecture determine machine instructions
(Chapter 2 and 3)
– Processor/Memory determine how fast instructions are executed
(Chapter 5, 6, and 7)
•
Assessing and Understanding Performance in Chapter 4
2004 Morgan Kaufmann Publishers
7
What is a computer?
•
•
Components:
– input (mouse, keyboard)
– output (display, printer)
– memory (disk drives, DRAM, SRAM, CD)
– network
Our primary focus: the processor (datapath and control)
– implemented using millions of transistors
– Impossible to understand by looking at each transistor
– We need...
2004 Morgan Kaufmann Publishers
8
Understanding program performance
Hardware or software
component
How is component affects
performance
Where is this
topic covered?
Algorithm
Determines both the number of
source-level statements and the
number of I/O operations executed
Other books!
Programming language,
compiler, and architecture
Determines the number of machine
instructions for each source-level
statement
Chapter 2 and
3
Processor and memory
system
Determines how fast instructions can
be executed
Chapter 5, 6,
and 7
I/O system (hardware and
operating system)
Determines how fast I/O operations
may be executed
Chapter 8
2004 Morgan Kaufmann Publishers
9
FIGURE 1.3
A simplified view of hardware and software as hierarchical
layers, shown as concentric circles with hardware in the center
and applications software outermost
2004 Morgan Kaufmann Publishers
10
Abstraction
•
Delving into the depths
reveals more information
•
An abstraction omits unneeded detail,
helps us cope with complexity
What are some of the details that
appear in these familiar abstractions?
2004 Morgan Kaufmann Publishers
11
How do computers work?
•
Need to understand abstractions such as:
– Applications software
– Systems software
– Assembly Language
– Machine Language
– Architectural Issues: i.e., Caches, Virtual Memory, Pipelining
– Sequential logic, finite state machines
– Combinational logic, arithmetic circuits
– Boolean logic, 1s and 0s
– Transistors used to build logic gates (CMOS)
– Semiconductors/Silicon used to build transistors
– Properties of atoms, electrons, and quantum dynamics
•
So much to learn!
2004 Morgan Kaufmann Publishers
12
FIGURE 1.5 The organization of a computer, showing
the five classic components
2004 Morgan Kaufmann Publishers
13
FIGURE 1.6 A desktop computer
2004 Morgan Kaufmann Publishers
14
FIGURE 1.7
Each coordinate in the frame buffer on the left determines
the shade of the corresponding coordinate for the raster scan
CRT display on the right.
2004 Morgan Kaufmann Publishers
15
FIGURE 1.8 Inside the personal computer of Figure
1.6 on page 17.
2004 Morgan Kaufmann Publishers
16
FIGURE 1.9 Inside the processor chip used on the
board shown in Figure 1.8.
2004 Morgan Kaufmann Publishers
17
FIGURE 1.10 Close-up of PC motherboard.
2004 Morgan Kaufmann Publishers
18
FIGURE 1.11 A disk showing 10 disk platters and the
read/write heads.
2004 Morgan Kaufmann Publishers
19
Instruction Set Architecture
•
A very important abstraction
– interface between hardware and low-level software
– standardizes instructions, machine language bit patterns, etc.
– advantage: different implementations of the same architecture
– disadvantage: sometimes prevents using new innovations
True or False: Binary compatibility is extraordinarily important?
•
Modern instruction set architectures:
– IA-32, PowerPC, MIPS, SPARC, ARM, and others
2004 Morgan Kaufmann Publishers
20
FIGURE 1.12 Relative performance per unit cost of
technologies used in computers over time.
Year
Technology used in computers
Relative performance/unit cost
1951
Vacuum tube
1965
Transistor
1975
Integrated circuit
1995
Very large scale integrated circuit
2,400,000
2005
Ultra large scale integrated circuit
6,200,000,000
1
35
900
2004 Morgan Kaufmann Publishers
21
FIGURE 1.13 Growth of capacity per DRAM chip over time.
2004 Morgan Kaufmann Publishers
22
FIGURE 1.14 The chip manufacturing process.
2004 Morgan Kaufmann Publishers
23
FIGURE 1.15 An 8-inch (200-mm) diameter wafer
containing Intel Pentium 4 processors.
2004 Morgan Kaufmann Publishers
24
FIGURE 1.16
An Intel Pentium 4 (3.06 GHz) mounted on top of its
heat sink, which is designed to remove the 82 watts
generated within the die.
2004 Morgan Kaufmann Publishers
25
FIGURE 1.17 Performance increase of workstations,
1987-2003.
2004 Morgan Kaufmann Publishers
26
Historical Perspective
•
ENIAC built in World War II was the first general purpose computer
– Used for computing artillery firing tables
– 80 feet long by 8.5 feet high and several feet wide
– Each of the twenty 10 digit registers was 2 feet long
– Used 18,000 vacuum tubes
– Performed 1900 additions per second
–Since then:
Moore’s Law:
transistor capacity doubles
every 18-24 months
2004 Morgan Kaufmann Publishers
27