welcome to comp 411! computer organization and design montek singh mon, jan 10, 2011 lecture 1 david...

35
Welcome to Comp 411! Welcome to Comp 411! Computer Organization and Computer Organization and Design Design Montek Singh Montek Singh Mon, Jan 10, 2011 Mon, Jan 10, 2011 Lecture 1 Lecture 1 David Macaulay

Post on 22-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Welcome to Comp 411!Welcome to Comp 411!

Computer Organization and Computer Organization and DesignDesign

Montek SinghMontek Singh

Mon, Jan 10, 2011Mon, Jan 10, 2011

Lecture 1Lecture 1 David Macaulay

Page 2: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Topics for todayTopics for today Course MechanicsCourse Mechanics Course ObjectivesCourse Objectives What is Information?What is Information? Computer AbstractionsComputer Abstractions

Page 3: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Instructor: Montek Singh (FB234 Brooks Bldg.)

Office Hours: TBA

TA: TBABook: Patterson & Hennessy

Computer Organization & Design

4th ed., Nov 2008ISBN 978-0123744937

Meet the Crew…Meet the Crew…

TA??

Page 4: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

CreditsCredits Some of these slides were developed by Some of these slides were developed by

Leonard McMillan and adapted by Gary Bishop Leonard McMillan and adapted by Gary Bishop and me.and me.

Page 5: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Course MechanicsCourse Mechanics Grading:Grading:

Problem sets: Problem sets: 25%25%5-7 problem sets in all5-7 problem sets in allLowest one will be droppedLowest one will be dropped

Four In-Class Quizzes: Four In-Class Quizzes: 15%15% Three Exams: Three Exams: 35%35% Lab: Lab: 25%25%

Page 6: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Course MechanicsCourse Mechanics Policies:Policies:

Problem Sets:Problem Sets:Will be distributed on the web. You will Will be distributed on the web. You will

typically have 1 week to do them, but typically have 1 week to do them, but sometimes more or less time.sometimes more or less time.

Late problem sets will not be accepted, Late problem sets will not be accepted, but the lowest problem-set score will be but the lowest problem-set score will be dropped.dropped.

Honor Code:Honor Code:The honor code is in effect for all The honor code is in effect for all

homework, labs, exams etc. Please review homework, labs, exams etc. Please review the policy on the course website.the policy on the course website.

Lecture Notes:Lecture Notes: I will attempt to make Lecture Slides, I will attempt to make Lecture Slides,

Problem Sets, and other course materials Problem Sets, and other course materials available on the web either before class, available on the web either before class, or soon after, on the day they are given.or soon after, on the day they are given.

Page 7: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

PrerequisitesPrerequisites COMP401: Foundations of ProgrammingCOMP401: Foundations of Programming

This is a hard prerequisiteThis is a hard prerequisite You may be able to substitute another programming You may be able to substitute another programming

course, but please first talk to me!course, but please first talk to me!

You need to know at least the following concepts:You need to know at least the following concepts: basic data types: integers, characters, Boolean, etc.basic data types: integers, characters, Boolean, etc. basic arithmetic operators and expressionsbasic arithmetic operators and expressions ““if-then-else” constructs, and “while”/“for” loopsif-then-else” constructs, and “while”/“for” loops function and procedure callsfunction and procedure calls basic Boolean operators (AND, OR, XOR, etc.)basic Boolean operators (AND, OR, XOR, etc.)

If you don’t know many of the above concepts, If you don’t know many of the above concepts, please talk to me!please talk to me!

Page 8: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

How to do well in this courseHow to do well in this course Attend lectures (stay awake!)Attend lectures (stay awake!) Read the book!Read the book!

Big mistake = only reviewing lecture slidesBig mistake = only reviewing lecture slides

Do all homeworkDo all homework Start early. Many problem sets are too hard to attempt the Start early. Many problem sets are too hard to attempt the

night before.night before.

Ask questions in classAsk questions in class Discuss with other studentsDiscuss with other students

But all work handed must be your own (see Honor Code)But all work handed must be your own (see Honor Code)

Remember: Use all materials from this semester Remember: Use all materials from this semester onlyonly Much of the material (lecture slides, homework) has Much of the material (lecture slides, homework) has

changedchanged Looking up solutions from earlier semesters = cheating. Looking up solutions from earlier semesters = cheating.

Not worth it.Not worth it.

Page 9: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Comp 411: Course WebsiteComp 411: Course Website

Linked from http://www.cs.unc.edu/~montek/

Page 10: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Who I amWho I am

Page 11: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Who are you?Who are you? By year?By year? By major?By major?

Page 12: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Goal 1: Demystify ComputersGoal 1: Demystify Computers Strangely, most people (even some computer Strangely, most people (even some computer

scientists) are afraid of computers.scientists) are afraid of computers.

We are only afraid of things we do not understand!We are only afraid of things we do not understand! I do not fear computers. I fear the lack of them. I do not fear computers. I fear the lack of them.

- Isaac Asimov (1920 - 1992)- Isaac Asimov (1920 - 1992)

Fear is the main source of superstition, and one of the Fear is the main source of superstition, and one of the main sources of cruelty. To conquer fear is the beginning of main sources of cruelty. To conquer fear is the beginning of wisdom. wisdom.

- Bertrand Russell (1872 – - Bertrand Russell (1872 – 1970)1970)

Page 13: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Computers EverywhereComputers Everywhere The computers we are used toThe computers we are used to

DesktopsDesktops

LaptopsLaptops

Embedded processorsEmbedded processorsCarsCarsMobile phonesMobile phonesToasters, irons, wristwatches, happy-meal toysToasters, irons, wristwatches, happy-meal toys

Page 14: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Goal 2: Power of AbstractionGoal 2: Power of Abstraction What is What is abstraction?abstraction?

Define a function, develop a robust implementation, Define a function, develop a robust implementation, and then put a box around it.and then put a box around it.

Why is abstraction useful?Why is abstraction useful? enables us to create unfathomable machines called enables us to create unfathomable machines called

computerscomputers imagine a billion --- 1,000,000,000imagine a billion --- 1,000,000,000

Page 15: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Abstraction is key to building Abstraction is key to building systems with >1G componentssystems with >1G components

Personal Computer:Hardware & Software

Circuit Board:8 / system

1-2G devices

Integrated Circuit:8-16 / PCB

0.25M-16M devices Module:

8-16 / IC100K devices

Cell:1K-10K / Module

16-64 devices Gate:2-8 / Cell8 devices

Scheme for representing information

MOSFET=“transistor”

=“device”

Page 16: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Our Plan of Attack…Our Plan of Attack…

Understand how things work, by alternating between low-level (bottom-up) and high level (top-down) concepts

Encapsulate our understanding using appropriate abstractions

Study organizational principles: abstractions, interfaces, APIs.

Roll up our sleeves and design at each level of hierarchy Learn engineering tricks at each level

Page 17: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Compiler for (i = 0; i < 3; i++) m += i*i;

Assembler and Linkeraddi $8, $6, $6 sll $8, $8, 4CPU

ModuleALU

A B

Cells A BCO CI S

FA

A Computer SystemA Computer System What is a computer system? What is a computer system? Where does it start?Where does it start? Where does it end?Where does it end?

Gates

Transistors

Page 18: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Computer Layer CakeComputer Layer Cake ApplicationsApplications Systems softwareSystems software Shared librariesShared libraries Operating SystemOperating System Hardware – the bare metalHardware – the bare metal

Hardware

Operating System

Libraries

Systems S/WAppsComputers are

digital Chameleons

Page 19: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Under the CoversUnder the Covers InputInput OutputOutput StorageStorage ProcessingProcessing

DatapathDatapath ControlControl

Page 20: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Under the CoversUnder the Covers InputInput OutputOutput StorageStorage ProcessingProcessing

DatapathDatapath ControlControl

Page 21: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Under the CoversUnder the Covers InputInput OutputOutput StorageStorage ProcessingProcessing

DatapathDatapath ControlControl

Cathode Ray Tube (CRT)The “last vacuum tube”Now nearing extinction

Page 22: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Under the CoversUnder the Covers InputInput OutputOutput StorageStorage ProcessingProcessing

DatapathDatapath ControlControl

Liquid Crystal Displays (LCDs)

Page 23: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Under the CoversUnder the Covers InputInput OutputOutput StorageStorage ProcessingProcessing

DatapathDatapath ControlControl

Page 24: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Under the CoversUnder the Covers InputInput OutputOutput StorageStorage ProcessingProcessing

DatapathDatapath ControlControl

2009 ??4Gb

Page 25: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Under the CoversUnder the Covers InputInput OutputOutput StorageStorage ProcessingProcessing

DatapathDatapath ControlControl

Intel® Pentium® Core 2 Duo Extreme processor

The hottest chip you can get???

Page 26: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Courtesy Troubador

Issues for Modern ComputersIssues for Modern Computers GHz Clock speedsGHz Clock speeds Multiple InstructionsMultiple Instructions

per clock cycleper clock cycle Multi-coreMulti-core Memory WallMemory Wall I/O bottlenecksI/O bottlenecks Power DissipationPower Dissipation Implementation techImplementation tech

changeschanges

http://www.hotchips.org/

Page 27: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Implementation TechnologyImplementation Technology RelaysRelays Vacuum TubesVacuum Tubes TransistorsTransistors Integrated CircuitsIntegrated Circuits

Gate-level integrationGate-level integration Medium Scale Integration (PALs)Medium Scale Integration (PALs) Large Scale Integration (Processing unit on a chip)Large Scale Integration (Processing unit on a chip) Today (Multiple CPUs on a chip)Today (Multiple CPUs on a chip)

Nanotubes??Nanotubes?? Quantum-Effect Devices??Quantum-Effect Devices??

Page 28: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

openclosed

Implementation TechnologyImplementation Technology Common Links?Common Links?

A controllable switchA controllable switch

Computers are wires and switchesComputers are wires and switches

open

control

Page 29: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

ChipsChips Silicon WafersSilicon Wafers

Chip manufactures build Chip manufactures build many copies of the same many copies of the same circuit onto a single wafer.circuit onto a single wafer.Only a certain percentage of Only a certain percentage of

the chips will work; those that the chips will work; those that work will run at different work will run at different speeds. The yield decreases speeds. The yield decreases as the size of the chips as the size of the chips increases and the feature size increases and the feature size decreases.decreases.

Wafers are processed by Wafers are processed by automated fabrication lines.automated fabrication lines.To minimize the chance of To minimize the chance of

contaminants ruining a process contaminants ruining a process step, great care is taken to step, great care is taken to maintain a meticulously clean maintain a meticulously clean environment.environment.

Page 30: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

ChipsChips Silicon WafersSilicon Wafers

Metal 2

M1/M2 via

Metal 1

Polysilicon

Diffusion

Mosfet (under polysilicon gate)

IBM photomicrograph

Page 31: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

What is “Computation”?What is “Computation”? Computation is about “processing information”Computation is about “processing information”

Transforming information from one form to anotherTransforming information from one form to another Deriving new information from oldDeriving new information from old Finding information associated with a given inputFinding information associated with a given input

““Computation” describes the motion of Computation” describes the motion of information through timeinformation through time

““Communication” describes the motion of Communication” describes the motion of information through spaceinformation through space

Page 32: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

What is “Information”?What is “Information”?

information, n. Knowledge communicated or received concerning a particular fact or circumstance.

Information resolves uncertainty. Information is simply that which cannot be predicted.

The less predictable a message is, the more information it conveys!

Carolina won again.

Tell me something

new…

“ 10 Problem sets, 2 quizzes, and a final!”

A Computer Scientist’s Definition:

Page 33: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Real-World InformationReal-World InformationWhy do unexpected messages get allocated the biggest headlines?

… because they carry the most information.

Page 34: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

What Does A Computer Process? What Does A Computer Process? A Toaster processes bread and bagelsA Toaster processes bread and bagels A Blender processes smoothiesA Blender processes smoothies

and margaritasand margaritas What does a computer process?What does a computer process?

InformationInformation BitsBits

What is the mapping from What is the mapping from information to bits?information to bits?

Page 35: Welcome to Comp 411! Computer Organization and Design Montek Singh Mon, Jan 10, 2011 Lecture 1 David Macaulay

Next LectureNext Lecture Computer RepresentationsComputer Representations How do computers represent:How do computers represent:

Text?Text? Numbers?Numbers? Everything else?Everything else?