CS1004: Intro to CS in Java, Spring 2005

Similar documents
Chapter 5: Computer Systems Organization

Chapter 5: Computer Systems Organization. Invitation to Computer Science, C++ Version, Third Edition

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

The Von Neumann Architecture. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

Designing Computers. The Von Neumann Architecture. The Von Neumann Architecture. The Von Neumann Architecture

CMPUT101 Introduction to Computing - Summer 2002

Computer Architecture (part 2)

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

The Von Neumann Architecture Odds and Ends. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

CMPUT101 Introduction to Computing - Summer 2002

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 16, 2000

CMPUT 101 with Solutions Quiz 2 (50 minutes) August 7, 2002

Level 2: The Hardware World Chapters 4 and 5 (topics of other cs courses)

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

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

5 Computer Organization

Computer Organization

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

5 Computer Organization

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 7, 2003

CS 101, Mock Computer Architecture

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

BASIC COMPUTER ORGANIZATION. Operating System Concepts 8 th Edition

Show how to connect three Full Adders to implement a 3-bit ripple-carry adder

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

Computer Organization and Assembly Language (CS-506)

Computer Organization

Computer Architecture and Assembly Language. Spring

Introduction to Computers - Chapter 4

COMPUTER STRUCTURE AND ORGANIZATION

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

Ceng 111 Fall 2015 Week 5b

Computer Organization

Computer Architecture 2/26/01 Lecture #

17. Instruction Sets: Characteristics and Functions

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

Computer Architecture

Chapter 2 Data Manipulation

CS 140 Introduction to Computing & Computer Technology. Computing Components

THE MICROPROCESSOR Von Neumann s Architecture Model

EC-801 Advanced Computer Architecture

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory

Memory General R0 Registers R1 R2. Input Register 1. Input Register 2. Program Counter. Instruction Register

Computer Architecture and Data Manipulation. Von Neumann Architecture

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

Von Neumann Architecture

Computer Architecture COMP360

Lecture 2 Microcomputer Organization: Fig.1.1 Basic Components of Microcomputer

Chapter One. Introduction to Computer System

AS/A Level Computing Syllabus 2011

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Summary of Computer Architecture

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

MICROCONTROLLERS 8051

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

CS101 Lecture 25: The Machinery of Computation: Computer Architecture. John Magee 29 July 2013 Some material copyright Jones and Bartlett

Processing Unit CS206T

Operating system Dr. Shroouq J.

Chapter 5 Computing Components

von Neumann Architecture Basic Computer System Early Computers Microprocessor Reading Assignment An Introduction to Computer Architecture

Basic Computer System. von Neumann Architecture. Reading Assignment. An Introduction to Computer Architecture. EEL 4744C: Microprocessor Applications

Quiz on Ch.4 is at the end of Ch.4 slides

Microcontroller Systems

Machine Architecture. or what s in the box? Lectures 2 & 3. Prof Leslie Smith. ITNP23 - Autumn 2014 Lectures 2&3, Slide 1

Lecture 19: Computers. Pay no attention to the man behind the curtain.

Multiple Choice Type Questions

Chapter 2 Instruction Set Architecture

William Stallings Computer Organization and Architecture. Chapter 11 CPU Structure and Function

History. 3rd Generation- Integrated Circuits, Transistors (Integrated Circuit form) for Memory ( memory is now volatile), Terminal/Keyboard for I/O

Instruction Register. Instruction Decoder. Control Unit (Combinational Circuit) Control Signals (These signals go to register) The bus and the ALU

Microcontrollers. Microcontroller

Single cycle MIPS data path without Forwarding, Control, or Hazard Unit

Segment 1A. Introduction to Microcomputer and Microprocessor

Instruction Sets: Characteristics and Functions

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Information Science 1

CS Computer Architecture

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

RISC (Reduced Instruction Set Computer)

3.1 Description of Microprocessor. 3.2 History of Microprocessor

Chapter 6 Part 1 Understanding Hardware

11. A Computing Machine

CC411: Introduction To Microprocessors

ECE2049-E18 Lecture 6 Notes 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

COMPUTER ORGANIZATION AND ARCHITECTURE

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

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

The Memory Hierarchy 10/25/16

SAE5C Computer Organization and Architecture. Unit : I - V

16.1. Unit 16. Computer Organization Design of a Simple Processor

CSC 553 Operating Systems

COMPUTER ORGANIZATION & ARCHITECTURE

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

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMPUTER ARCHITECURE- III YEAR EEE-6 TH SEMESTER 16 MARKS QUESTION BANK UNIT-1

CISC Processor Design

Computer Architecture and Organization (CS-507)

Transcription:

CS1004: Intro to CS in Java, Spring 2005 Lecture #10: Computer architecture Janak J Parekh janak@cs.columbia.edu HW#2 due Tuesday Administrivia Mass Storage RAM is volatile Not useful for permanent storage, and expensive in large quantities Use nonvolatile mass storage (magnetic media, flash) for permanent storage Random/direct access: hard drives, CD/DVD-ROMs Uses its own addressing scheme to access data Sequential access: tape drives Stores data sequentially; slow Primarily for backup nowadays 1

Data stored on (hard) spinning disks (platters( platters) Disk divided into concentric rings (tracks( tracks) Read/write head moves from one ring to another while disk spins Access time depends on: Time to move head to correct sector (seek) Time for sector to spin to data location (latency) Hard Disks I/O Controller Intermediary between central processor and I/O devices Hard drives are much slower than memory, so Processor sends request and data, then goes on with its work I/O controller interrupts processor when request is complete Memory hierarchy of a computer (registers fastest, tape slowest) Organization of an I/O Controller (page 202) 2

The Arithmetic/Logic Unit Actual computations are performed Primitive operation circuits Arithmetic (ADD, etc.) Comparison (CE, etc.) Logic (AND, etc.) Data inputs and results stored in registers Multiplexor selects desired output ALU Process Values for operations copied into ALU s s input register locations All circuits compute results for those inputs Multiplexor selects the one desired result from all values Result value copied to desired result register Using a Multiplexor Circuit to Select the Proper ALU Result (p. 207) 3

The Control Unit Manages stored program execution Task Fetch from memory the next instruction to be executed Decode it: determine what is to be done Execute it: issue appropriate command to ALU, memory, and I/O controllers Instructions are selected from an instruction set language Control Unit Components Parts of control unit Links to other subsystems (I/O controllers, etc.) Instruction decoder circuit Two more special registers: Program Counter (PC): Stores the memory address of the next instruction to be executed Instruction Register (IR): Stores the code for the current instruction We follow the fetch-decode decode-executeexecute cycle repeatedly until the machine is turned off The Organization of a Von Neumann Computer (p. 516) 4

Machine Language Instructions Can be decoded and executed by control unit Parts of instructions Operation code (opcode( opcode): Unique unsigned-integer integer code assigned to each machine language operation Address field(s): Memory addresses of the values on which operation will work Main types of instructions Data transfer Move values to and from memory and registers Fetch/store operations Arithmetic/logic Perform ALU operations that produce numeric values Compares Set bits of compare register to hold result Branches Jump to a new memory address to continue processing Let s s design a processor Flexibility as to how we design it RISC or CISC how many instructions? How many operands? We ll stick to one decimal operand for simplicity How many registers? Book s s convention: we ll use one temporary register cell ( R )) for math operations Rest will be to and from main memory Accumulator architecture: early Intel CPUs derived from this What s s the setup of the memory for data or code? For simplicity s s sake, we ll keep everything near each other 5

Book s s hypothetical machine: basic operations Binary opcode 0000 0001 0010 0011 0100 0101 0110 0111 Operation LOAD X STORE X CLEAR X ADD X INCREMENT X SUBTRACT X DECREMENT X COMPARE X Meaning CON(X) R R CON(X) 0 CON(X) R + CON(X) R CON(X) + 1 CON X R CON(X) R CON(X) 1 CON(X) Sets condition code for JUMPs Dealing with compare We want to design conditional code: based on a particular result, run different pieces of code COMPARE will set one of three condition codes (in a special register) to 1, and the rest to 0 GT (greater than) EQ (equal) LT (less than) We can then tell the processor to jump to other code based on the result We ll explore conditionals in much greater detail in Java Book s s hypothetical machine: jumps and I/O Binary opcode 1000 1001 1010 1011 1100 1101 1110 1111 Operation JUMP X JUMPGT X JUMPEQ X JUMPLT X JUMPNEQ X IN X OUT X HALT Meaning Get next instruction from memory location X Get next instruction from X if GT = 1 Get next instruction from X if EQ = 1 Get next instruction from X if LT = 1 Get next instruction from X if EQ = 1 Get input and store in X Output (in decimal) value at X Stop program execution 6

Simple examples Practice problem 1, p. 213: set a to the value b+c+d Practice problem 2, p. 213: if (a = b), set c to the value of d Note different use of equals in the book we mean equality here, not assignment Let s s assume a is at memory location 100, b is at 101, c at 102, d at 103, and that the code starts at memory location 50 The Future: Non-Von Neumann Architectures Physical limitations on speed of Von Neumann computers Non-Von Neumann architectures explored to bypass these limitations Parallel computing architectures can provide improvements: multiple operations occur at the same time SIMD instructions: apply single instruction to a vector of data MIMD instructions: essentially multiple closely coordinated processors in parallel Hyperthreading,, dual-core processors Segue/next time Start thinking about memory and object management in Java Chapter 3 of Lewis/Loftus covers how to use existing classes and object in Java Chapter 4 will cover how to make our own classes in greater detail Memory architecture we ve just discussed will help visualize how objects work 7