cse141: Introduction to Computer Architecture Steven Swanson Alice - - PowerPoint PPT Presentation

cse141 introduction to computer architecture
SMART_READER_LITE
LIVE PREVIEW

cse141: Introduction to Computer Architecture Steven Swanson Alice - - PowerPoint PPT Presentation

cse141: Introduction to Computer Architecture Steven Swanson Alice Liang 1 Todays Agenda What is architecture? Why is it important? Whats in this class? 2 Computer Architecture 3 What is architecture? How do you build a machine


slide-1
SLIDE 1

cse141: Introduction to Computer Architecture

Steven Swanson Alice Liang

1

slide-2
SLIDE 2

Today’s Agenda

What is architecture? Why is it important? What’s in this class?

2

slide-3
SLIDE 3

Computer Architecture

3

slide-4
SLIDE 4

What is architecture?

  • How do you build a machine that computes?
  • Quickly, safely, cheaply, efficiently, in technology X,

for application Y, etc.

  • Architects develop new mechanism for

performing and organizing “mechanical” computation

4

slide-5
SLIDE 5

Why is architecture important?

  • For the world
  • Computer architecture provides the engines that power all of

computing

5

Civilization advances by extending the number

  • f important operations which we can perform

without thinking about them.

  • - Alfred North Whitehead
slide-6
SLIDE 6

6

slide-7
SLIDE 7

6

slide-8
SLIDE 8

6

slide-9
SLIDE 9

6

slide-10
SLIDE 10

6

slide-11
SLIDE 11

6

slide-12
SLIDE 12

6

slide-13
SLIDE 13

6

slide-14
SLIDE 14

6

slide-15
SLIDE 15

Why is architecture important?

  • For the world
  • Computer architecture provides the engines that power all of

computing

  • For you
  • As computer scientists, software engineers, and

sophisticated users, understanding how computers work is essential

  • The processor is the most important piece of this story
  • Many performance (and efficiency) problems have their roots

in architecture.

7

Civilization advances by extending the number

  • f important operations which we can perform

without thinking about them.

  • - Alfred North Whitehead
slide-16
SLIDE 16

Orientation

The internet

slide-17
SLIDE 17

Orientation

The internet

slide-18
SLIDE 18
  • Architecturally, these machines are more similar than

different

  • Same parts
  • Different Scale
  • Different Constraints

Handheld Ultra Portable High-end Server Motherboards to scale

slide-19
SLIDE 19

Orientation: A Server

PCIe

Memor y Architecture begins about here. Memor y Memor y Memor y Memor y Memor y Memor y Memor y

CPU Sockets

slide-20
SLIDE 20

Orientation: MacBook Air

System Hub Memory

Architecture begins about here.

CPU Connectors SSD Slot

slide-21
SLIDE 21

Orientation: iPhone 4s

Sim Card

Architecture begins about here.

CPU + DRAM

Flash Memory

  • n the back

Peripherals

slide-22
SLIDE 22
slide-23
SLIDE 23

You are here

Nehalem Corei7 Quad-core Server processor Nvidia Tegra 3 Five-core mobile processor

slide-24
SLIDE 24

The processors go here…

slide-25
SLIDE 25

The processors go here…

slide-26
SLIDE 26

The processors go here…

slide-27
SLIDE 27

The processors go here…

slide-28
SLIDE 28

The processors go here…

slide-29
SLIDE 29

The processors go here…

slide-30
SLIDE 30

The processors go here…

slide-31
SLIDE 31

The processors go here…

slide-32
SLIDE 32

The processors go here…

slide-33
SLIDE 33

The processors go here…

slide-34
SLIDE 34

The processors go here…

slide-35
SLIDE 35

The processors go here…

slide-36
SLIDE 36

Abstractions of the Physical World…

Physics/Materials Devices Micro-architecture Architectures Processors

slide-37
SLIDE 37

Abstractions of the Physical World…

Physics/Materials Devices Micro-architecture Architectures Processors

This Course cse241a/ ECE dept Physics/ Chemistry/ Material science

slide-38
SLIDE 38

…for the Rest of the System

Architectures

JVM

Processor Abstraction Compilers Languages Software Engineers/ Applications

slide-39
SLIDE 39

…for the Rest of the System

Architectures

JVM

Processor Abstraction Compilers Languages Software Engineers/ Applications

cse130 cse121 cse131

cseEverythingElse

slide-40
SLIDE 40

Current state of architecture

slide-41
SLIDE 41

Moore’s Law

  • The number of transistors we can build in a fixed area
  • f silicon doubles (roughly) every two years.

19

Moore’s Law is the most important driver for historic CPU performance gains

slide-42
SLIDE 42

Since 1940

20

slide-43
SLIDE 43

Since 1940

50,000 x speedup >1,000,000,000 x density (Moore’s Law)

20

slide-44
SLIDE 44

Since 1940

Plug boards -> Java Hand assembling -> GCC No OS -> Windows 7 50,000 x speedup >1,000,000,000 x density (Moore’s Law)

20

slide-45
SLIDE 45

Since 1940

Plug boards -> Java Hand assembling -> GCC No OS -> Windows 7

We have used this performance to make computers easier to use, easier to program, and to solve ever-more complicated problems.

50,000 x speedup >1,000,000,000 x density (Moore’s Law)

20

slide-46
SLIDE 46

Since 1940

Plug boards -> Java Hand assembling -> GCC No OS -> Windows 7

We have used this performance to make computers easier to use, easier to program, and to solve ever-more complicated problems.

50,000 x speedup >1,000,000,000 x density (Moore’s Law)

20

slide-47
SLIDE 47

1 10 100 1000 10000 100000 1990 1995 2000 2005 2010 2015 Relative Performance or Clock speed (Mhz) Year specINT95 Perf specINT2000 Perf specINT2006 Perf specINT2000 Mhz specINT2006 Mhz

Where do We Get Performance?

21

slide-48
SLIDE 48

1 10 100 1000 10000 100000 1990 1995 2000 2005 2010 2015 Relative Performance or Clock speed (Mhz) Year specINT95 Perf specINT2000 Perf specINT2006 Perf specINT2000 Mhz specINT2006 Mhz

Where do We Get Performance?

21

Clock speed

slide-49
SLIDE 49

1 10 100 1000 10000 100000 1990 1995 2000 2005 2010 2015 Relative Performance or Clock speed (Mhz) Year specINT95 Perf specINT2000 Perf specINT2006 Perf specINT2000 Mhz specINT2006 Mhz

Where do We Get Performance?

21

Golden age: ~40-50%/year

Clock speed

slide-50
SLIDE 50

1 10 100 1000 10000 100000 1990 1995 2000 2005 2010 2015 Relative Performance or Clock speed (Mhz) Year specINT95 Perf specINT2000 Perf specINT2006 Perf specINT2000 Mhz specINT2006 Mhz

Where do We Get Performance?

21

Golden age: ~40-50%/year Modern era: ~25%/year

Clock speed

slide-51
SLIDE 51
  • Clock speed is the biggest contributor to

power

  • Chip manufactures (Intel, esp.) pushed clock speeds

very hard in the 90s and early 2000s.

  • Doubling the clock speed increases power by 2-8x
  • Clock speed scaling is essentially finished.
  • Most future performance improvements will

be due to architectural and process technology improvements

The End of Clock Speed Scaling

22

slide-52
SLIDE 52

Power

23

Watts/cm

2

1 10 100 1000

1.5µ 1.5µ 1µ 1µ 0.7µ 0.7µ 0.5µ 0.5µ 0.35µ 0.35µ 0.25µ 0.25µ 0.18µ 0.18µ 0.13µ 0.13µ 0.1µ 0.1µ 0.07µ 0.07µ

slide-53
SLIDE 53

Power

23

Watts/cm

2

1 10 100 1000

1.5µ 1.5µ 1µ 1µ 0.7µ 0.7µ 0.5µ 0.5µ 0.35µ 0.35µ 0.25µ 0.25µ 0.18µ 0.18µ 0.13µ 0.13µ 0.1µ 0.1µ 0.07µ 0.07µ

slide-54
SLIDE 54

Power

23

Watts/cm

2

1 10 100 1000

1.5µ 1.5µ 1µ 1µ 0.7µ 0.7µ 0.5µ 0.5µ 0.35µ 0.35µ 0.25µ 0.25µ 0.18µ 0.18µ 0.13µ 0.13µ 0.1µ 0.1µ 0.07µ 0.07µ

slide-55
SLIDE 55

Power

23

Watts/cm

2

1 10 100 1000

1.5µ 1.5µ 1µ 1µ 0.7µ 0.7µ 0.5µ 0.5µ 0.35µ 0.35µ 0.25µ 0.25µ 0.18µ 0.18µ 0.13µ 0.13µ 0.1µ 0.1µ 0.07µ 0.07µ

slide-56
SLIDE 56

Power

23

Watts/cm

2

1 10 100 1000

1.5µ 1.5µ 1µ 1µ 0.7µ 0.7µ 0.5µ 0.5µ 0.35µ 0.35µ 0.25µ 0.25µ 0.18µ 0.18µ 0.13µ 0.13µ 0.1µ 0.1µ 0.07µ 0.07µ

slide-57
SLIDE 57

Power

23

Watts/cm

2

1 10 100 1000

1.5µ 1.5µ 1µ 1µ 0.7µ 0.7µ 0.5µ 0.5µ 0.35µ 0.35µ 0.25µ 0.25µ 0.18µ 0.18µ 0.13µ 0.13µ 0.1µ 0.1µ 0.07µ 0.07µ

slide-58
SLIDE 58

The Rise of Parallelism

  • Multi-processors
  • If one CPU is fast, two must be faster!
  • They allow you to (in theory) double performance

without changing the clock speed.

  • Seems simple, so why are becoming so

important now

  • Speeding up a single CPU makes everything faster!
  • An application’s performance double every 18 months with no

effort on the programmer’s part.

  • Getting performance out of a multiprocessor requires

work.

  • Parallelizing code is difficult, it takes (lots of) work
  • There aren’t that many threads
  • Remember or look forward to cse120

24

slide-59
SLIDE 59

25

Intel P4 (2000) 1 core Intel Core 2 Duo (2006) 2 cores AMD Zambezi (2011) 16 cores SPARC T3 (2010) 16 cores Intel Nahalem (2010) 4 cores Nvidia Tegra 3 (2011) 5 cores

slide-60
SLIDE 60

Why This Class?

26

slide-61
SLIDE 61

The Goal of a Degree in CS or CE (My $0.02)

  • To understand the components and

abstractions that make up a modern computing system

  • To understand how they impact a system’s

performance, efficiency, and usefulness

  • To be able to harness, modify, and extend

them to solve problems effectively

27

slide-62
SLIDE 62

Goals for this Class

28

  • Understand how CPUs run programs
  • How do we express the computation the CPU?
  • How does the CPU execute it?
  • How does the CPU support other system components (e.g., the OS)?
  • What techniques and technologies are involved and how do they work?
  • Understand why CPU performance (and other metrics) vary.
  • How does CPU design impact performance?
  • What trade-offs are involved in designing a CPU?
  • How can we meaningfully measure and compare computer systems?
  • Understand why program performance varies
  • How do program characteristics affect performance?
  • How can we improve a programs performance by considering the CPU

running it?

  • How do other system components impact program performance?
slide-63
SLIDE 63

What’s in this Class

29

  • Instruction sets
  • MIPS
  • x86
  • ISAs and the compiler
  • The processor pipeline
  • Basic design
  • Pipelining
  • Dealing with hazards
  • Speculation and control
  • Measuring

performance

  • Amdahl’s Law
  • Performance

measurement

  • Metrics
  • The memory system
  • Memory technologies
  • Caching
  • Operating system

support

  • Virtual memory
  • Exceptions, interrupts
  • IO
  • Introduction to

multiprocessors

slide-64
SLIDE 64

Performance and You!

  • Live Demo

30

cd demos/ make java -server -Xmx$[1024*1024*1024] -Xmx$[1024*1024*1024] LoopNest 1000 ij java -server -Xmx$[1024*1024*1024] -Xmx$[1024*1024*1024] LoopNest 1000 ji

slide-65
SLIDE 65

cse141 Logistics

31

slide-66
SLIDE 66

Course Staff

  • Instructor: Steven Swanson
  • Lectures Tues + Thurs
  • Office hours TBA
  • TA: Alice Liang
  • Discussion sec: Wednesday.
  • See the course web page for

contact information and office hours:

  • http://cseweb.ucsd.edu/classes/

sp13/cse141-a/

32

slide-67
SLIDE 67

Academic Honesty

  • Don’t cheat.
  • Cheating on a test will get you an F in the class and

no option to drop, and a visit with your college dean.

  • Cheating on homeworks means you don’t have to

turn them in any more, but you don’t get points

  • either. You will also take at least 25% penalty on the

exam grades.

  • Copying solutions of the internet or a

solutions manual is cheating.

  • Review the UCSD student handbook
  • When in doubt, ask.

33

slide-68
SLIDE 68

Your Tasks

  • Sign up for the mailing lists.
  • Read the text!
  • Computer Organization and Design: The Hardware/Software

Interface (4th Edition, revised) -- previous editions are not supported

  • I’m not going to cover everything in class, but you are responsible

for all the assigned text.

  • Come to class!
  • I will cover things not in the book.
  • You are responsible for them too.
  • Homeworks throughout the course. (20%)
  • Weekly quizzes on Thursdays (20%)
  • One midterm (25%)
  • One cumulative final (35%)

34

slide-69
SLIDE 69

Quizzes

  • Every Thursday, online.
  • Covers everything up to and including the

previous class

  • 20 Minutes, 4-5 questions
  • Roughly 2% of your grade each
  • No make-ups

35

slide-70
SLIDE 70

Homeworks

  • Assigned on Thursday, due one week later
  • Partly from the book.
  • These are the best way to prepare for the

tests.

  • Due in a TA’s box, 15 minutes before class

starts.

  • Check the assignment for which TA to turn it in to.
  • The mailboxes are located in the grad student mail

room on the second floor of the CSE building.

36

slide-71
SLIDE 71

The Link to 141L

  • You do not need to take 141L along with 141,

but you may need both to get your degree.

  • The classes are mostly independent, except
  • We will study the MIPS ISA in 141, and you will

implement it in 141L

  • The discussions about processor implementation in

141 will be useful in 141L.

37

slide-72
SLIDE 72

Grading

  • Grading is on a 13 point scale -- F through A+
  • You will get a letter grade on each assignment
  • Your final grade is the weighted average of the

assignment grades.

  • An excel spreadsheet calculates your grades
  • We will post a sanitized version online once a week.
  • It will tell you exactly where you stand.
  • It specifies the curves used for the exams etc.
  • OpenOffice doesn’t run it properly.

38