



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Outline of the Course. •. Learn computer architecture, design and organization. •. Evaluating computer system performance. •. Instruction set design.
Typology: Lecture notes
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Instructor
Zhao Zhang
Tel: 294-
Email: [email protected]
Office Hours: MWF 10:00-11:
Teaching Assistant
See Web Page for Information
Web Page
Follow link from home page of department
Text Book: Computer Organization and Design 2nd edition
Patterson and Hennessy
Learn computer architecture, design and organization
Evaluating computer system performance
Instruction set design
Computer algorithms and ALU design
Processor data path design
Pipelined control and performance
Memory system design
I/O system design
Putting it all together
Examples
Rapidly changing field:
vacuum tube -> transistor -> IC -> VLSI (see section 1.4)
memory capacity and processor speed is doubling every 1.5 years:
Things you’ll be learning:
how computers work, a basic foundation
how to analyze their performance (or how not to!)
issues affecting design of modern processors (caches, pipelines)
Why learn this stuff?
You want to design state-of-art system
you want to call yourself a “computer scientist or engineer”
you want to build software people use (need performance)
you need to make a purchasing decision or offer “expert” advice
Components:
input (mouse, keyboard)
output (display, printer)
memory (disk drives, DRAM, SRAM, CD)
network
Our primary focus:
understanding performance
the processor (datapath and control)
implemented using millions of transistors
impossible to understand by looking at each transistor
we need an abstraction
Delving into the depthsreveals more information
An abstraction omits unneeded detail,helps us cope with complexity What are some of the details thatappear in these familiar abstractions?
swap(int v[], int k){int temp;
temp = v[k];v[k] = v[k+1];v[k+1] = temp; } swap:
muli $2, $5,4add $2, $4,$2lw
$15, 0($2)
lw
$16, 4($2)
sw
$16, 0($2)
sw
$15, 4($2)
jr
$
00000000101000010000000000011000000000001000111000011000001000011000110001100010000000000000000010001100111100100000000000000100101011001111001000000000000000001010110001100010000000000000010000000011111000000000000000001000
Binary machinelanguageprogram(for MIPS)
C compiler Assembler
High-levellanguageprogram(in C) Assemblylanguageprogram(for MIPS)
A programmer’s view of machine
What does it include?
What is Computer Organization, Structure, and Function?
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:
80x86/Pentium/K6, PowerPC, DEC Alpha, MIPS, SPARC, HP
Historical Perspective
Hardware and software are layered
Some functions can be moved back and forth
System software is a collection of programs
OS, compilers are some examples
It makes job of individuals user easy
Application software programs
Used by many users
1642 Pascal: Mechanical Comuter
1671: Gottfried Leibniz ADD/SUB/MUL/DIV
1801: Automatic Control of Weaving Process
1827 The Difference Engine by Charles Babbage
1936: Zuse Z1: electromechanical computers
1941: Zuse Z
1943: Zuse Z
1944: Aiken: Ark 1 at Harvard
1942-45: ABC at Iowa State (Attanasoff-Berry Computer)
1946: ENIAC: Eckert and Mauchley: Vacuum Tube
1945 EDVAC by von-Neumann machine, father of modern computing
Based on computing differences, a finite n-th order polynomial canbe differentiated n times, which can be represented by a difference
For example
y = Sin (x) = x – x
3
To compute value of sin(x) at x0, x1, x2, x3, x4, x5, x6…. such thatdifference in two consecutive values is small, we can calculate y0,y1, y2, and y3 by hand and call them
0
y0,
0
y1,
0
y2, and
0
y
Then first order difference is
1
y0 = y1-y0;
1
y1 = y2-y1;
1
y2 = y3-y2;
Second order difference is
2
y0 =
1
y1 -
1
y0 = y2-2y1+y0; and so on
Third order difference is
3
y0 =
y1 -
2
y0 = y3-3y2+3y1-y
4
y0 = 0
Using this we can recursively compute
3
y1,
2
y1, and
1
y1, and
0
y
And so on….
Measure, Report, and Summarize
Make intelligent choices
See through the marketing hype
Key to understanding underlying organizational motivation Why is some hardware better than others for different programs?What factors of system performance are hardware related?
(e.g., Do we need a new machine, or a new operating system?)
How does the machine's instruction set affect performance?
Airplane
Passengers
Range (mi) Speed (mph)
Boeing 737-
Boeing 747
BAC/Sud Concorde
Douglas DC-8-
How much faster is the Concorde compared to the 747?
How much bigger is the 747 than the Douglas DC-8?
Response Time (latency)
— How long does it take for my job to run?— How long does it take to execute a job?— How long must I wait for the database query?
Throughput
— How many jobs can the machine run at once?— What is the average execution rate?— How much work is getting done?
If we upgrade a machine with a new processor what do we increase?
If we add a new machine to the lab what do we increase?
Elapsed Time
counts everything
(disk and memory accesses, I/O , etc.)
a useful number, but often not good for comparison purposes
CPU time
doesn't count I/O or time spent running other programs
can be broken up into system time, and user time
Our focus: user CPU time
time spent executing the lines of code that are "in" our program
For some program running on machine X,
Performance
X
= 1 / Execution time
X
"X is n times faster than Y"
Performance
X
/ Performance
Y
= n
Problem:
machine A runs a program in 20 seconds
machine B runs the same program in 25 seconds
Instead of reporting execution time in seconds, we often use cycles
Clock “ticks” indicate when to start activities (one abstraction):
cycle time = time between ticks = seconds per cycle
clock rate (frequency) = cycles per second (1 Hz. = 1 cycle/sec)A 200 Mhz. clock has a
cycle time
time
secondsprogram
cycles program
seconds
cycle
5 nanoseconds