ppt - Computer and Information Science
Download
Report
Transcript ppt - Computer and Information Science
CIS 314 : Computer Organization
Lecture 1 – Introduction
° Instructor: Prof. Ginnie Lo
° GTF: Kaveh Kazemi
° Prerequisite: CIS212, MATH231
www.cs.uoregon.edu/classes/10F/cis314
Note: These slides are heavily based on the slides used in previous
years. However, we have made changes, deletion, and additions to
them.
Textbook
• Required: Computer Organization and
Design: The Hardware/Software
Interface, Fourth Edition, Patterson and
Hennessy (P&H).
• The book should be available in the bookstore
• We’ll use both the textbook and the CD included with
it
• Keep reading the relevant chapter as we cover each
topic
• Put your name on your green card right away!
CIS314 - Winter 2012
2
Weekly Schedule
• Lectures - Principles and concepts
– MWF 2:00-2:50 307 Volcanology
– Prof. Lo Office Hrs: TBA
– Kaveh Kazemi Office Hrs: TBA
• Lab – Programming Assignments
– F 9:00 – 9:50 026 Klamath
– F 1:00 – 1:50 026 Klamath
• Please come to class on time
• Most course materials at /cs/classes/12W/cis314
• Grades and Announcements on Blackboard
(blackboard.uoregon.edu)
CIS314 - Winter 2012
3
Course Assignments
• Homework assignments
• Due at beginning of lecture. NO LATE ASSIGNMENT IS
ACCEPTED!
• You can drop lowest HW grade. Turn in partially complete
work.
Programming assignments (assembly lang)
– You will use the SPIM simulator. Grading is based on how your program
runs on the department machines.
– Get CS UNIX accounts ASAP (http://newuser.cs.uoregon.edu)
• In-class Quizzes
–
Almost Every Week in Lecture Class. You can drop lowest Quiz grade.
CIS314 - Winter 2012
4
Two Course Exams
– Midterm: Friday Feb 17 in class
• One sheet of notes allowed
• Review session TBD
– Final: Wednesday March 21 @ 3:15 PM
• One sheet of notes allowed
• Review session TBD
CIS314 - Winter 2012
5
GRADING
15%
10%
15%
30%
30%
Homework Assignments
Quizzes
Programming assignments
Midterm
Final
CIS314 - Winter 2012
6
Course Problems…Cheating
• What is cheating?
– Studying together in groups is encouraged.
– Turned-in work must be completely your own unless it is a group
problem.
– Common examples of cheating: saving somebody else’s work to
drive/remote site, take homework from box and copy, person
asks to borrow solution “just to take a look”, copying an exam
question, …
– Both “giver” and “receiver” are equally culpable
• Cheating on homework/projects: negative points for that
assignment (e.g., if it’s worth 10 pts, you get -10)
• Cheating on exams: F in the course.
• Every offense will be referred to the Office of Student
Judicial Affairs (http://darkwing.uoregon.edu/%7Econduct/)
CIS314 - Winter 2012
7
Today
•
•
•
•
•
Computers from then to now
Six great advances in computer architecture
The focus of CIS 314
Instruction set architectures
Class survey and class photos
CIS314 - Winter 2012
8
Computer Eras: Mainframe 1950s-60s
Processor (CPU)
I/O
“Big Iron”: IBM, UNIVAC, … build $1M compute
for businesses => COBOL, Fortran, timesharing
4/6/2017
9
Minicomputer Eras: 1970s
Using integrated circuits, Digital, HP… build
$10k computers for labs, universities => C,
UNIX OS
4/6/2017
10
PC Era: Mid 1980s - Mid 2000s
Using microprocessors, Apple, IBM, … build
$1k computer for 1 person => Basic, Java,
Windows OS
4/6/2017
11
PostPC Era: Late 2000s - ??
4/6/2017
Personal Mobile
Devices (PMD):
Relying on wireless
networking, Apple,
Nokia, … build $500
smartphone and
tablet computers for
individuals
=> Objective C,
Android OS
Cloud Computing:
Using Local Area Networks,
Amazon, Google, … build $200M
Warehouse Scale Computers
with 100,000 servers for
Internet Services for PMDs
=> MapReduce, Ruby on Rails
12
Advanced RISC Machine (ARM)
instruction set inside the iPhone
You will how to design and program a
related RISC computer: MIPS
4/6/2017
13
iPhone Innards
I/O
Processor
1 GHz ARM
Cortex A8
I/O
4/6/2017
Memor
y
I/O
14
Cloud Computing
•
•
very large datacenters
illusion of infinite computing
resources available on
demand;
elimination of an up-front
commitment by Cloud users;
ability to pay for use of
computing resources on a
short-term basis as needed。
large-scale software infrastructure
operational expertise
15
Why Cloud Computing Now?
• “The Web Space Race”: Build-out of extremely large
datacenters (10,000’s of commodity PCs)
– Build-out driven by growth in demand (more users)
Infrastructure software and Operational expertise
• Discovered economy of scale: 5-7x cheaper than
provisioning a medium-sized (1000 servers) facility
• More pervasive broadband Internet so can access
remote computers efficiently
• Commoditization of HW & SW
– Standardized software stacks
16
6 Great Ideas in Computer Architecture
(applicable to computers of the 1950s-2020s)
1.
2.
3.
4.
5.
6.
*Layers of Representation/Interpretation
*Moore’s Law
*Principle of Locality/Memory Hierarchy
*Parallelism
Performance Measurement & Improvement
Dependability via Redundancy
4/6/2017
17
Great Idea #1: Levels of
Representation/Interpretation
High Level Language
Program (e.g., C)
Compiler
Assembly Language
Program (e.g., MIPS)
Assembler
Machine Language
Program (MIPS)
temp = v[k];
v[k] = v[k+1];
v[k+1] = temp;
lw
lw
sw
sw
0000
1010
1100
0101
$t0, 0($2)
$t1, 4($2)
$t1, 0($2)
$t0, 4($2)
1001
1111
0110
1000
1100
0101
1010
0000
Anything can be represented
as a number,
i.e., data or instructions
0110
1000
1111
1001
1010
0000
0101
1100
1111
1001
1000
0110
0101
1100
0000
1010
1000
0110
1001
1111
Machine
Interpretation
Hardware Architecture Description
(e.g., block diagrams)
Architecture
Implementation
Logic Circuit Description
(Circuit Schematic Diagrams)
4/6/2017
18
Predicts: 2X Transistors / chip every 2 years
# of transistors on an integrated circuit (IC)
#2: Moore’s Law
Gordon Moore
Intel Cofounder
4/6/2017
Year
19
Moore’s Law
• Moore predicted that density of data on a chip
would double every year
• Specifically density of transistors on an integrated
circuit
• True for 4 decades. Has slowed a little to double
every 18 months. Expected to continue for at
least two more decades.
• Implications: increased performance, decreased
cost
CIS314 - Winter 2012
20
Great Idea #3: Principle of Locality/
Memory Hierarchy
4/6/2017
Spring 2011 -- Lecture #1
21
Great Idea #4: Parallelism
4/6/2017
22
Great Idea #5: Performance Measurement
and Improvement
• Matching application to underlying hardware to
exploit:
– Locality
– Parallelism
– Special hardware features, like specialized instructions
(e.g., matrix manipulation)
• Latency
– How long to set the problem up
– How much faster does it execute once it gets going
– It is all about time to finish
4/6/2017
23
Great Idea #6:
Dependability via Redundancy
• Redundancy so that a failing piece doesn’t
make the whole system fail
1+1=2
1+1=2
1+1=2
2 of 3 agree
1+1=1
FAIL!
Increasing transistor density reduces the cost of redundancy
4/6/2017
24
Great Idea #6:
Dependability via Redundancy
• Applies to everything from datacenters to storage to
memory
– Redundant datacenters so that can lose 1 datacenter but
Internet service stays online
– Redundant disks so that can lose 1 disk but not lose data
(Redundant Arrays of Independent Disks/RAID)
– Redundant memory bits of so that can lose 1 bit but no data
(Error Correcting Code/ECC Memory)
4/6/2017
Spring 2011 -- Lecture #1
25
What is CIS 314 all about?
• Four of the great ideas with focus on #1
• Fundamental concepts about how a computer
works
– The five basic components of a computer
– How everything boils down to 1’s and 0’s
– How a computer program is executed by the
hardware
– Machine language: the basic language that a
computer ‘understands’
– How the basic instructions in a machine language are
carried out by the computer hardware
CIS314 - Winter 2012
26
What is this course all about? (cont.)
• Fundamental concepts about how a computer
works
– A little about how a program in a high level language
like C gets translated into machine language
(More “what” than “how”. The how is really the topic of our
compilers course)
– How to measure computer performance
– How the computer architecture is designed to
maximize performance:
• CPU design: Pipelining
• Memory design: Caching
• Parallelism: Multicore
CIS314 - Winter 2012
27
What technical skills in 314?
• Assembly Language Programming in MIPS
–A side effect of understanding the key ideas (not the
goal of this course)
• Logic Design
–A little about how to design computer
components from logic gates
• Unix Basics
–Basic commands and tools
CIS314 - Winter 2012
28
Technical details in CIS 314:
Course focus is on concepts and abstractions.
You pick a current processor to learn about, e.g.
CIS314 - Winter 2012
29
What is Computer Organization?
Where is the HW/SW Interface?
Application (C program)
Compiler
Software
Hardware
Assembler
Operating
System
(Unix)
Processor Memory I/O system
Instruction Set
Architecture
Datapath & Control
Digital Design
Circuit Design
Transistors
* Coordination of many
levels (layers) of abstraction
CIS314 - Winter 2012
30
Great Idea #1: Levels of
Representation/Interpretation
High Level Language
Program (e.g., C)
Compiler
Assembly Language
Program (e.g., MIPS)
Assembler
Machine Language
Program (MIPS)
temp = v[k];
v[k] = v[k+1];
v[k+1] = temp;
lw
lw
sw
sw
0000
1010
1100
0101
$t0, 0($2)
$t1, 4($2)
$t1, 0($2)
$t0, 4($2)
1001
1111
0110
1000
1100
0101
1010
0000
Anything can be represented
as a number,
i.e., data or instructions
0110
1000
1111
1001
1010
0000
0101
1100
1111
1001
1000
0110
0101
1100
0000
1010
1000
0110
1001
1111
Machine
Interpretation
Hardware Architecture Description
(e.g., block diagrams)
Architecture
Implementation
Logic Circuit Description
(Circuit Schematic Diagrams)
4/6/2017
31
5 components of any Computer and the
VonNeumann model
Computer
Processor
Control
(“brain”)
Datapath
(“brawn”)
Memory
(where
programs,
data
live when
running)
Devices
Input
Output
Keyboard,
Mouse
Disk
(where
programs,
data
live when
not running)
Display,
Printer
CIS314 - Winter 2012
32
Computer Technology - Dramatic
Changes!
• Memory
– DRAM capacity: 2x / 2 years (since ‘96);
64x size improvement in last decade.
• Processor
– Speed 2x / 1.5 years (since ‘85);
100X performance in last decade.
• Disk
– Capacity: 2x / 1 year (since ‘97)
250X size in last decade.
CIS314 - Winter 2012
33
Computer Technology - Dramatic Change
• Current PCs (at least…)
– Processor clock speed: 3-4 GHz
– Number of cores: 2-4
– Memory capacity: 4.0 GB
– Disk capacity: 2000 GB (2.0 TB = TeraBytes)
– New units needed for the future!
(Kilo, Mega, Giga, Tera, Peta, Exa, Zetta, Yotta = 1024)
CIS314 - Winter 2012
34
Summary of Key Ideas
• Continued rapid improvement in computing
–2Xevery 2.0 years in memory size;
every 1.5 years in processor speed;
every 1.0 year in disk capacity;
–Moore’s Law enables processor
(2X transistors/chip ~1.5 yrs)
–Levels of representation and interpretation and the
HW/SW interface
–5 components of all computers and the VonNeumann
model (stored program model)
CIS314 - Winter 2012
35
Instruction Set Architectures
• Different CPUs implement different sets of
instructions.
• The set of instructions a particular CPU
implements is an Instruction Set
Architecture (ISA).
– Examples: Intel 80x86 (Pentium 4),
IBM/Motorola PowerPC (Macintosh), MIPS,
Intel IA64, ...
CIS314 - Winter 2012
36
•
Instruction Set Architectures History
Accumulator ISA
– One register in the CPU for arithmetic called the accumulator
LOAD ACC, X
ADD
ACC, Y
STORE ACC, Z
• Stack ISA
– A stack is used for arithmetic
PUSH X
PUSH Y
ADD
POP Z
CIS314 - Winter 2012
37
Instruction Set Architectures
• General Purpose Register ISA
• Three types based on where operands for
arithmetic operations can come from.
– Memory-memory
– Register-memory
– Register-register (Load/Store)
MIPS has a Load/Store ISA
CIS314 - Winter 2012
38
Instruction Set Architectures
• Early trend was to add more and more
instructions to new CPUs to do elaborate
operations
– VAX architecture had an instruction to multiply
polynomials!
• RISC philosophy: Reduced Instruction Set
Computing
– Keep the instruction set small and simple, makes
it easier to build fast hardware.
– Let software do complicated operations by
composing simpler
ones.
CIS314 - Winter 2012
39
RISC Architectures
• Fixed instruction lengths
• Load/store instruction sets
• Limited addressing modes (ways to access
variables in memory)
• Limited operations
• Sun SPARC, IBM PowerPC, MIPS
CIS314 - Winter 2012
40
A Few Famous Computer Hardware Designers:
RISC and pipelining
Stored program architecture
John Hennessy, President
Stanford University
RISC Architecture
David Patterson, Prof. UC Berkeley
RISC Architecture
CIS314 - Winter 2012
41
MIPS Architecture
• MIPS – semiconductor company that
built one of the first commercial RISC
architectures
• We will study the MIPS architecture in
some detail in this class (also used in
CIS 429 Computer Architecture)
• Why MIPS instead of Intel 80x86?
– MIPS is simple, elegant. Don’t want to get
bogged down in gritty details.
– MIPS widely used in embedded apps,
mobile apps.
CIS314 - Winter 2012
42
A few of my favorite computers
CIS314 - Winter 2012
43
Powerpoint Lecture Slides
• Credit to
– UC Berkeley Computer Science department, for
many of the slides for this course
– Ginnie Lo and Reza Rejaie, UO Computer
Science department
• Slides will be available on-line in .ppt and
.pdf formats on the course website
CIS314 - Winter 2012
44