Computer Technology & Abstraction

Similar documents
7/28/ Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc.

Chapter 9: A Closer Look at System Hardware

Chapter 9: A Closer Look at System Hardware 4

CS 101, Mock Computer Architecture

Chapter 1 Introduction. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

CPS104 Computer Organization Lecture 1

Introduction. Computer System Organization. Languages, Levels, Virtual Machines. A multilevel machine. Sarjana Magister Program

CPS104 Computer Organization Lecture 1. CPS104: Computer Organization. Meat of the Course. Robert Wagner

ECE 468 Computer Architecture and Organization Lecture 1

Computers Are Your Future

CISC 360. Computer Architecture. Seth Morecraft Course Web Site:

Typical Processor Execution Cycle

Computer Architecture

CS Computer Architecture

COMPUTER ORGANIZATION (CSE 2021)

Topics Power tends to corrupt; absolute power corrupts absolutely. Computer Organization CS Data Representation

COMPUTER ORGANIZATION (CSE 2021)

Computer Architecture. Fall Dongkun Shin, SKKU

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

COS 140: Foundations of Computer Science

PC I/O. May 7, Howard Huang 1

Alternate definition: Instruction Set Architecture (ISA) What is Computer Architecture? Computer Organization. Computer structure: Von Neumann model

CSCI 402: Computer Architectures. Instructions: Language of the Computer (1) Fengguang Song Department of Computer & Information Science IUPUI

CSCI 402: Computer Architectures. Instructions: Language of the Computer (1) Fengguang Song Department of Computer & Information Science IUPUI

CIT 668: System Architecture

Technology in Action

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

Computer Organization

CSE : Introduction to Computer Architecture

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Chapter 1. Computer Abstractions and Technology

Overview of Computer Organization. Chapter 1 S. Dandamudi

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro

Chapter 4 The Components of the System Unit

Overview of Computer Organization. Outline

CPE300: Digital System Architecture and Design

Course Outline. Introduction. Intro Computer Organization. Computer Science Dept Va Tech January McQuain & Ribbens

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

Computer Organization & Assembly Language Programming. CSE 2312 Lecture 2 Introduction to Computers

Computer System Overview

Instruction Set Architecture. "Speaking with the computer"

Chapter 5 12/2/2013. Objectives. Computer Systems Organization. Objectives. Objectives (continued) Introduction. INVITATION TO Computer Science 1

Computer Architecture

Computer Organization and Programming

Computer Architecture and Assembly Language. Spring

CS/COE0447: Computer Organization

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

Computer Systems Architecture

Computer Architecture Computer Architecture. Computer Architecture. What is Computer Architecture? Grading

Chapter 2. OS Overview

Real instruction set architectures. Part 2: a representative sample

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Computer Architecture

About the Presentations

Processing Unit CS206T

A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e. Chapter 1 Introducing Hardware

Computer Architecture s Changing Definition

Orange Coast College. Business Division. Computer Science Department. CS 116- Computer Architecture. Pipelining

CIT 668: System Architecture. Computer Systems Architecture

The Central Processing Unit

Computer Architecture

Components of a personal computer

Computers Are Your Future

Basic Concepts COE 205. Computer Organization and Assembly Language Dr. Aiman El-Maleh

Introduction to Computer Systems and Operating Systems

COMPUTER SYSTEM. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U

IT 252 Computer Organization and Architecture. Introduction. Chia-Chi Teng

The Computer Revolution. Chapter 1. The Processor Market. Classes of Computers. Morgan Kaufmann Publishers August 28, 2013

Homeschool Enrichment. The System Unit: Processing & Memory

EEM 486: Computer Architecture

The Components of the System Unit

Instruction Set Design

CS430 - Computer Architecture William J. Taffe Fall 2002 using slides from. CS61C - Machine Structures Dave Patterson Fall 2000

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

Lecture 01: Basic Structure of Computers

Welcome to COMPSCI111/111G!

Computer Architecture 2/26/01 Lecture #

Data Manipulation. Chih-Wei Tang ( 唐之瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan

CpE 442 Introduction To Computer Architecture Lecture 1

x86 Architectures; Assembly Language Basics of Assembly language for the x86 and x86_64 architectures

Update on logistics ECS 15

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Systems Architecture

Chapter Seven Morgan Kaufmann Publishers

Computer Architecture. Introduction. Lynn Choi Korea University

Course overview Computer system structure and operation

FUNCTIONS OF COMPONENTS OF A PERSONAL COMPUTER

Week 1. Introduction to Microcomputers and Microprocessors, Computer Codes, Programming, and Operating Systems

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

ECE232: Hardware Organization and Design

BASIC COMPUTER ORGANIZATION. Operating System Concepts 8 th Edition

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

1. Fundamental Concepts

Instructions: MIPS arithmetic. MIPS arithmetic. Chapter 3 : MIPS Downloaded from:

Full file at

Chapter 1. EE380, Fall Hank Dietz.

Transcription:

Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Computer Technology & Abstraction

Civilization advances by extending the number of operations which can be performed without thinking about them Alfred North Whitehead An Introduction to Mathematics, 1911 OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 2 2

Science Fiction or Science Fact Yesterday's Dreams -> Today's Reality ATM Embedded Computers Laptops, Palmtops, Wearable Computers The Internet, eh OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 3 3

Science Fact and Science Fiction Today's Dream -> Tomorrow's Technology Cashless Society Computers Automated Machines Artificial People What else? OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 4 4

Rapid Pace of Technology Hardware Vacuum Tube 1897 Edison Labs Transistor 1947 AT&T Labs Integrated Circuit 1958 Texas Instruments Fairchild Camera OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 5 5

Rapid Pace of Technology Currently the largest processor: ~400,000,000 transistors OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 6 6

Summarized Computer technology advances rapidly Processor Logic capacity: increases ~ 30% / yr Clock rate: increases ~ 20% / yr Memory DRAM capacity: increases ~ 60% / yr Memory speed: increases ~ 10% / yr Cost per bit: increases ~ 25% / yr Disk Capacity: increases ~ 60% / yr OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 7 7

Moore's Law Transistor count doubles of every 18 months Generalized Computer technology doubles every 18 months See Page 30 OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 8 8

The Virtuous Circle Result of Moore's Law Competition Advances in technology Low prices & better products New market & companies New applications OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 9 9

Rapid Pace of Technology But what about Software Has also evolved Machine Language: On/Off, 1/0, Up/Down Assembly Language: Mnemonic High-level languages: Fortran Block languages- Functions and logic Object Oriented Language- Data encapsulation OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 10 10

Evolution of Languages...101010... Machine Language MOV 42, R1 STORE R1, $A Assembly A = (42 + B) / C High level OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 11 11

Nathan's First of Law of Software Software is a gas. It expands to fill the container holding it Meaning: Software continues to acquire features that demand faster processors, bigger memories, & more I/O capacities Corollary: Wirth's Law -Nathan Myhrvold Software gets slower faster than hardware gets faster -Niklaus Wirth OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 12 12

The Language Barrier There is a large gap between what is convenient for computers & what is convenient for humans Translation and/or Interpretation is needed OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 13 13

Machine Language Is the language of the machines Based on a two letter alphabet 1 and 0 (binary) Basis for everything a computer deals with Instructions Data Tedious to handle OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 14 14

Assembly Language One line for every instruction 1-to-1 correspondence to machine language Programmer thinks as the machine Machine-dependent Assembler is needed to translate into machine language Assembler is itself software OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 15 15

High Level Languages High-level languages One line to many assembly instructions Near natural language Machine independent Compiler is needed to translate into either assembly or machine language Subroutine libraries Modular Code reuse OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 16

Bringing it all together swap (int v[], int k) { int temp temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } swap: muli $2, $5, 4 add $2, $4, $2 lw $15, 0($2) lw $18, 4($2) sw $18, 0($2) sw $15, 4($2) jr $31 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 High-level language C - Compiler Assembly language Assembler Machine language m/c Interpreter Control Signals OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 17 17

Hardware-Software Link Hardware Computer components CPU Memory Peripherals Software System SW Compilers/Interpreters Linkage editors Operating system Application SW MS-Office OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 18 18 A p S pli c a ti o n s ys t e m s s o s o f f t w a Hardware t w a r e r e User

Another way of looking at it... Problem-oriented language level Application programs Symbolic Translation (Compiler) Assembly language level Translation (Assembler) Operating system machine level Partial interpretation (OS) Instruction set architecture(isa) level Systems programs Numeric Micro-architecture level Interpretation (microprogram) or direct execution Hardware Digital logic level Device (transistor) level OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 19

Hardware and Software Components Hardware Memory components Registers Register file Memory Disks Functional components Adder, multiplier, dividers,... Comparators Control signals Software Data Simple Characters Numbers Structured Arrays Structures/Objects Instructions Data transfer Arithmetic Control flow OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 20

Closer look at Software Components... Software Applications Software Systems Software MS Office... Compilers Operating Systems Assemblers...... as... Virtual Memory File System I/O device drivers.................. OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 21 21

What we will learn Basic foundation on how computers work Assembly language introduction/review How to analyze program performance How to design processor components How to enhance processors performance (caches, pipelines, parallel processors, multiprocessors) OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 22

Organization and Architecture Architecture is a Specification Organization is the Implementation OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 23

Architecture is Specification Attributes visible to the programmer Attributes: Instruction set Number of bits representing data I/O mechanism Addressing modes used Has direct impact on logical program execution Example Itanium OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 24

Organization is Implementation Operational units and their interconnection that realizes the architecture Attributes: HW details Control signals I/O interfaces Memory technology used Example McKinley OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 25

The Motherboard 1. RAM sockets 2. Power connectors 3. Cache 4. CPU socket 5. Floppy & hard drives 6. External connectors for I/O devices 7. Expansion slots OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 26

More Motherboard Main memory DRAM (Dynamic Random Access Memory) Mounted on SIMM Slots (Single Inline Memory Module) Contains instructions & data Processor Covered by heat sinks for cooling Connectors for I/O devices Audio/MIDI Parallel/Serial PCI card slots ISA card slots IDE connectors Four ISA card slots Four PCI card slots Audio Four SIMM slots Parallel/ Serial CPU Two IDE Connectors OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 27 27

Computer Components Logical Components Input Mouse, Keyboard Output Display, Printer Memory Hard disk, DRAM, Cache CPU Datapath [ALU + Registers] Control Path OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 28

The Breakdown Computer Processor (CPU) Data path Control Memory Output Input Printer Screen Disk... keyboard Mouse Disk... OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 29

Lets look a little closer... Processor(CPU): Active part of the motherboard Performs calculations & activates devices Gets instructions & data from memory Components are connected via Buses Bus: Collection of parallel wires Transmits data, instructions, or control signals Motherboard Physical chips for I/O connections, memory, & CPU OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 30

The CPU Datapath (ALU+ Registers): Performs arithmetic & logical operations ALU = Arithmetic Logic Unit Register= Source of operands for the ALU Control (CU): Controls the data path, memory, & I/O devices Sends signals that determine operations of datapath, memory, input & output OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 31 31

Details of the CPU Example: Intel Pentium Area: 91 mm2 ~ 3.3 million transistors ( 1 million for cache memory) Data cache Control Branch Instruction cache Bus Integer datapath Floatingpoint datapat h OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 32

A more modern approach... OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 33

Memory Volatile memory Loses information when power is switched-off RAM Non-volatile memory Keeps information when power is switched-off Hard disk, Tape OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 34

Volatile Memory Cache Fast but expensive Smaller capacity Placed closer to the processor Main Memory (RAM) Less expensive Slower than cache LOTS more capacity OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 35

Non-volatile memory Secondary Memory Low cost Slower than RAM Hard disks 2003: $1/GB ($.001/MB) 1988: $11.54/MB Flash Devices USB Key Almost unlimited capacity Think Internet OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 36

Input/Output (I/O) I/O devices have the hardest organization Wide range of speeds Graphics vs. keyboard Wide range of requirements Speed Standard Cost... Least amount of research done in this area OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 37 37

Networking Connecting computers Extend computing power Communicate Share resources Have non-local access Advantages Communication Resource sharing Non-local access OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 38

More Networking... Local-Area Network (LAN) Connects computers on the same floor of a building Example: Ethernet Length ~1 km Speed 100 Mbytes/sec up to 1GBit/sec Wide-Area Network (WAN) Connects computers across continents The backbone of the Internet. Use optical fibers Leased from telecommunication companies OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 39

Shameless Plug If you want to know more about Networking CS 191 Thursday night OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 40

What is our Primary Concern? The processor (datapath and control) Implemented using millions of transistors Impossible to understand by looking at each transistor We need abstraction Hides lower-level details to offer simple model at higher level OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 41 41

Why Abstraction? Intensive & thorough research into the depths Reveals more information Omits unneeded details Helps us cope with complexity Examples of abstraction: Language hierarchy Instruction set architecture (ISA) OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 42

Instructions (Finally!) Instruction Smallest operation a processor can perform Add/Multiply two numbers ISA (Instruction Set Architecture) Architecture = Specification ISA is a contract This instruction will have this effect Encompasses information needed to write machinelanguage programs Abstract interface between the hardware and lowest-level software OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 43

More ISA ISA considered software Organization = Implementation Several implementations of an ISA may exist Modern ISAs x86: 8086, 286, 386, 486, Pentium, Athlon Others: PowerPC, MIPS, SPARC, Alpha OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 44

Why Multiple Implementations? Advantages Easier to change than hardware Standardizes instructions, machine language bit patterns, etc. Increases competetion Disadvantage (why not?) It can prevent new innovations Example: Intel OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 45

But how do instructions work? Smallest unit of operation a processor can perform Instruction is represented as a series of bits (1's and 0's) that the processor interprets Based on a given pattern, it does something specific, like add ISA specifies what a particular instruction does What operands it uses Where the result is stored OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 46

Basic Flow OP1 + OP2... Op1 Op2 Generalpurpose Registers Bus Op1 Op2 ALU i/p registers ALU OP1 + OP2 ALU o/p register OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 47 47

The Instruction Cycle Every processor follows the same cycle Fetch Next Instruction From Memory Decode Instruction determine its size & action Fetch Operand data Execute instruction & compute results or status Called the von Neumann machine OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 48

A little closer... Issues to consider Instruction Fetch: What is the instruction Format? How is the instruction decoded? Instruction decoding: Location of operands and result Where is the operand stored? How many explicit operands are allowed for the instruction? How are memory operands located? Which operands can (or cannot) be in memory? OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 49

A little closer... Issues to consider Operand fetch: What is the data type & size of the operand? Execution: What are the supported operations? Next Instruction: Should the next instruction to be executed be Successor instruction? Some other instruction? Jumps, conditions, or branches OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 50

Typical Instructions Operation Category Data Movement Arithmetic Shift Logical String Control (Jump/Branch) Subroutine Linkage Interrupt Synchronization Graphics (MMX) Examples Memory Load / Store Memory-to-memory move Register-to-register move Input / output (to/from I/O device) Push, pop (to/from stack) Integer (binary + decimal) or FP Add, Subtract, Multiply, Divide Shift left/right, rotate left/right Not, and, or, set, clear Search, translate Unconditional, conditional Call, return Int Test & set (atomic r-m-w) Parallel sub-word ops (4 16bit add) OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 51 51

Motivation Not just for chip designers and compiler writers Computers are becoming omnipresent Everywhere you go, there they are Computer Architecture gives you Foundation for understanding how they work Foundation for what they can do Basis for rapidly learning new technology OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 52

How to get the most Read textbook (& some topics of the optional texts!) Be up-to-date by continuously searching the library & Internet! Becomes more interesting as you learn more Solve self-exercise and other exercises! Come back with your input & questions for discussion! Appreciate and participate in teamwork! OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 53

Homework Team Project: Write a short paper (1-2 pages) comparing two of the hardware characteristics of the following processor families: Pentium Pro Pentium 4 Celeron Athlon UltraSPARC PicoJava Present Results next Monday Short 5-10 minutes OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Kaufmann Modified Publishers by M.Malaty ( Augmented and M. & Modified Beers) by M.Malaty) 54