CS2100 Computer Organisation

advertisement
CS2100 Computer Organisation
http://www.comp.nus.edu.sg/~cs2100/
Introduction to Computer Organisation
(AY2015/6) Semester 1
Overview

The Big Picture



Brief History of Computer
Current Trend
The Course (2nd Part)




CS2100
Von Neumann Architecture
Instruction Set Architecture
Compilation Flow
Instruction Execution Flow
Computer Organisation
2
The Brief History of Computers
Year
Name
Speed
Remarks
1946
ENIAC
~1900 addition/sec
First electronic
computer
1951
UNIVAC
~2000 addition/sec
First commercial
computer
1964
IBM 360
500k ops/sec
Best known mainframe
1965
PDP-8
330k ops/sec
First minicomputer
1971
Intel 4004
100k ops/sec
First microprocessor
1977
Apple II
200k ops/sec
"First" PC
1981
IBM PC (Intel 8088
+ MS-DOS)
240k ops/sec
Dominated market
since then
2003
Intel Pentium 4
6G flops
"Last" Unicore
2011
Intel Core i7
~120G flops
Representative
multicores
CS2100
Computer Organisation
3
The Brief History: Supercomputer
33,826.7
35,000.0
30,000.0
Nov, 2008 Road-Runner (US)
25,000.0
Nov, 2009 Jaguar (US)
17,590.0
20,000.0
Nov, 2010 TianHe (China)
Nov, 2011 K-Computer (Japan)
15,000.0
10,510.0
Nov, 2012 Titan (US)
Nov, 2013 TianHe-2 (China)
10,000.0
5,000.0
2,566.0
1,759.0
1,105.0
0.0
Linpack Performance ( teraflops )
[ CS5222 Adv. Comp. Arch.
AY1314S2 ]
4
The Brief History: Embedded

Everywhere




CS2100
Smart-phone
Game consoles
DVD / Blue-Ray player
Car, Fridge, Washing Machine……… etc etc
Computer Organisation
5
Summary: From a few to
n
many
Transistor is the building block of CPU since 1960s
1970 - 1980
1980 - 1990
1990 - 2000
2000 - 2011
2K – 100K
100K – 1M
1M – 100M
100M – 2.2B
Current World Population = 7 billion
about the number of transistors in 3 CPU chips!
CS2100
Computer Organisation
6
Summary: From BIG to small
Process size = Minimum length of a transistor
80286
1982
1.5 µm
Pentium
Pentium 4
Core i7
1993
2000
2010
0.80 µm
- 0.25 µm
0.180 µm
- 0.065 µm
0.045 µm
- 0.032 µm
Wave length of visible light = 350nm (violet) to 780nm (red)
Process size now smaller than wavelength of violet light!
CS2100
Computer Organisation
7
Summary: From S-L-O-W to fast
FLOPS = FLoating-point Operation Per Second
80286
1982
1.8 MIPS*
CS2100
Pentium
Pentium 4
1993
2000
200 MFLOPS#
4
GFLOPS#
Computer Organisation
Core i7
2011
120 GFLOPS #
8
Summary: The Age of Computer

Unprecedented progress since late 1940s

Performance doubling ~2 years (1971-2005):



Total of 36,000X improvement!
If transportation industry matched this improvement,
we could have travelled from Singapore to Shanghai,
China in about a second for roughly a few cents!
Incredible amount of innovations to revolutionize
the computing industry again and again
CS2100
Computer Organisation
9
Moore’s Law

Intel co-founder Gordon Moore "predicted" in 1965 that
Transistor density will double every 18 months
CS2100
Computer Organisation
10
PROCESSOR PERFORMANCE INCREASE
CS2100
Computer Organisation
11
The Three Walls

Three major reasons for the unsustainable
growth in uniprocessor performance
The Memory Wall:
1.

Increasing gap between CPU and Main memory
speed
The ILP Wall:
2.

Decreasing amount of "work" (instruction level
parallelism) for processor
The Power Wall:
3.

CS2100
Increasing power consumption of processor
Computer Organisation
12
The Power Wall

We can now cramp more transistor into a
chip than the ability (power) to turn them on!
CS2100
Computer Organisation
13
Breakfast Anyone?

Hot enough to cook an egg!
CS2100
Computer Organisation
14
Current State of Computer

Multicore is the future




All PC chip manufacturers have abandoned
unicore development
Expect to have more cores in a single chip
Parallel programming is more important than ever
(CS3210, CS3211)
Great opportunity for computing professional



CS2100
New programming model is required
Parallelising existing software
Innovative ways to tap into the computing power
Computer Organisation
15
So, what do we get to learn?
2ND PART OF CS2100
CS2100
Computer Organisation
16
Computer Organization vs Architecture

Computer Organization:


Electronic Engineer's view of a computer system
Computer Architecture:

Assembly Programmers' view of a computer
system


High level abstract view
This course aims to:


CS2100
Give an in-depth understanding of the inner
working of a computer system
Concentrate on conceptual understanding rather
than hardware implementation
Computer Organisation
17
Von Neumann Architecture


Proposed by John Von Neumann et al, 1945
Major components of a computer system:
Bus
Processor
Memory
Control
Data Path
Input
Cache
Output
Registers

Devices
Stored-Memory Concept:

CS2100
Data and program are stored in memory
Computer Organisation
18
Components of Computer
Datapath:
Control:
• Sends signals that determines the operation of
datapath, memory, I/O
Register:
• Fast intermediate storage for values and control
information
Memory:
Input:
Output:
CS2100
• Reads data from memory, processes it, writes it back
to memory
• stores program and data
• feeds data (keyboard, mouse)
• processing result to user (display)
Computer Organisation
19
Example: Inside Your Laptop
CS2100
Computer Organisation
20
How do we “control” the hardware?

You write programs in high level
programming languages, e.g.,
C/C++, Java:
A + B

Compiler translates this into
assembly language statement:
add A, B

Assembler translates this statement
into machine language instructions
that the processor can execute:
1000 1100 1010 0000
CS2100
Computer Organisation
21
ISA – Interface between HW & SW
Software
Applications
Operating System
Compiler
Firmware
Programming
Languages,
Compilers,
Operating Systems,
Software Engineering
Instruction Set Architecture
Processor
Memory Organization
PART 2
Hardware
Datapath & Control
Digital Design
Circuit Design
Layout
CS2100
I/O System
Computer Organisation
PART 1
Electronic
Engineering
22
Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA)


A subpart of computer architecture that is related to
programming, as seen by the programmer and compiler
ISA exposes the capabilities of the underlying
processor as a set of well defined instructions

Serves as the interface between hardware and software

Serves as an abstraction which allow freedom in
hardware implementations
CS2100
Computer Organisation
23
Instruction Set Architecture - Examples
x86-32
(IA32)
Intel 80486,
Pentium (2,3, 4),
Core i3, i5, i7
AMD K5, K6,
Athlon, Duron,
Sempron
Dominates the PC
market

MIPS
ARM
R2000, R3000, …,
R10000
Generations of
chips: ARMv1, v2,
…., v7
StrongARM, ARM
Cortex
Widely used in
Comp. Org/Arch
courses as RISC
example
Most popular
embedded system
chip
Observe that each ISA has a family of chips i.e.
multiple hardware implementations
CS2100
Computer Organisation
24
The Life of a program
Program in
High-level language
(C, Pascal, etc)
Link multiple
machine-language programs
to one program
Compile program
into assembly language
Load program into
computer’s memory
Assemble program
to machine language
Execute program
CS2100
Computer Organisation
25
Code Execution

Instruction Execution Cycle in the Processor:
• Fetch next instruction from memory into processor
Fetch:
• Decode the instruction
Decode:
• Get operands
• Execute instruction
Execute: • Store the execution result
CS2100
Computer Organisation
26
Road Map for
Topic
Processor
nd
2
Part
Performance (10) Lecture Set(s)
Performance
Processor
Assembly
language (11,
12, 13)
MIPS Assembly Language

The Processor:
10
11, 12, 13
The
processor:
 Datapath
(14)
Control (15)
- Datapath
- Control
 Pipelining (16)
14
15
Pipelining
16

Memory hierarchy:
 Cache
(17, 18)
Memory
: Cache
/ Output
Input
Input/Output
CS2100
17, 18
19*
(19)
Computer Organisation
27
Reading Assignment

Computer Abstractions and Technology

CS2100
Read up COD sections 1.1 – 1.3.
Computer Organisation
28
End
CS2100
Computer Organisation
29
Download