Interfacing Processors and Peripherals Andreas Klappenecker CPSC321 Computer Architecture.

Slides:



Advertisements
Similar presentations
Chapter 8 Interfacing Processors and Peripherals.
Advertisements

IT253: Computer Organization
I/O Organization popo.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Lecture 21Comp. Arch. Fall 2006 Chapter 8: I/O Systems Adapted from Mary Jane Irwin at Penn State University for Computer Organization and Design, Patterson.
1  1998 Morgan Kaufmann Publishers Interfacing Processors and Peripherals.
Datorteknik BusInterfacing bild 1 Bus Interfacing Processor-Memory Bus –High speed memory bus Backplane Bus –Processor-Interface bus –This is what we usually.
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
CSCE 212 Chapter 8 Storage, Networks, and Other Peripherals Instructor: Jason D. Bakos.
Lecture Objectives: 1)Explain the limitations of flash memory. 2)Define wear leveling. 3)Define the term IO Transaction 4)Define the terms synchronous.
IOSystems.1 Review: Major Components of a Computer Processor Control Datapath Memory Devices Input Output  Important metrics for an I/O system l Performance.
EE30332 Ch8 DP – 1 Ch 8 Interfacing Processors and Peripherals Buses °Fundamental tool for designing and building computer systems divide the problem into.
S. Barua – CPSC 440 CHAPTER 8 INTERFACING PROCESSORS AND PERIPHERALS Topics to be covered  How to.
Cache Performance, Interfacing, Multiprocessors CPSC 321 Andreas Klappenecker.
1  1998 Morgan Kaufmann Publishers Chapter 8 Storage, Networks and Other Peripherals.
Processor Design 5Z0321 Processor Design 5Z032 Chapter 8 Interfacing Processors and Peripherals Henk Corporaal.
1  1998 Morgan Kaufmann Publishers Chapter 8 Interfacing Processors and Peripherals.
1 CSE SUNY New Paltz Chapters 8 Interfacing Processors and Peripherals.
1  2004 Morgan Kaufmann Publishers Chapters 8 & 9 (partial coverage)
1 Interfacing Processors and Peripherals I/O Design affected by many factors (expandability, resilience) Performance: — access latency — throughput — connection.
1  1998 Morgan Kaufmann Publishers Chapter Seven.
COMP381 by M. Hamdi 1 Input/Output Systems. COMP381 by M. Hamdi 2 Motivation: Who Cares About I/O? CPU Performance: 60% per year I/O system performance.
Chapter 8: Part II Storage, Network and Other Peripherals.
1 Input/Output (I/O) Devices I/O is the eyes, ears, nose, mouth, hands, legs, etc. of the computer system. Imagine a computer without I/O.
INPUT/OUTPUT ARCHITECTURE By Truc Truong. Input Devices Keyboard Keyboard Mouse Mouse Scanner Scanner CD-Rom CD-Rom Game Controller Game Controller.
Computer Architecture Lecture 08 Fasih ur Rehman.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Storage & Peripherals Disks, Networks, and Other Devices.
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
CPU BASICS, THE BUS, CLOCKS, I/O SUBSYSTEM Philip Chan.
1chapter 8 Review: Major Components of a Computer Processor Control Datapath Memory Devices Input Output Important metrics for an I/O system –Performance.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
1 Interfacing Processors and Peripherals I/O Design affected by many factors (expandability, resilience) Performance: — access latency — throughput — connection.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
DMA Versus Polling or Interrupt Driven I/O
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
Lecture 35: Chapter 6 Today’s topic –I/O Overview 1.
Bus Mr. Mukul Varshney. Bus A bus, in computing, is a set of physical connections (cables, printed circuits, etc.) which can be shared by multiple hardware.
August 1, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 9: I/O Devices and Communication Buses * Jeremy R. Johnson Wednesday,
CSIE30300 Computer Architecture Unit 11: Bus and I/O Systems Hsin-Chou Chi [Adapted from material by and
MBG 1 CIS501, Fall 99 Lecture 18: Input/Output (I/O): Buses and Peripherals Michael B. Greenwald Computer Architecture CIS 501 Fall 1999.
Organisasi Sistem Komputer Materi VIII (Input Output)
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
CS2100 Computer Organisation Input/Output – Own reading only (AY2015/6) Semester 1 Adapted from David Patternson’s lecture slides:
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 16: Introduction to Buses and Interfaces.
Chapter 6 Storage and Other I/O Topics. Chapter 6 — Storage and Other I/O Topics — 2 Introduction I/O devices can be characterized by Behaviour: input,
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
Processor Memory Processor-memory bus I/O Device Bus Adapter I/O Device I/O Device Bus Adapter I/O Device I/O Device Expansion bus I/O Bus.
1 Ó1998 Morgan Kaufmann Publishers Chapter 8 I/O Systems.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 26 Bus Interconnect May 7,
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
10/15: Lecture Topics Input/Output –Types of I/O Devices –How devices communicate with the rest of the system communicating with the processor communicating.
1  2004 Morgan Kaufmann Publishers Page Tables. 2  2004 Morgan Kaufmann Publishers Page Tables.
CSCE 385: Computer Architecture Spring 2014 Dr. Mike Turi I/O.
1 Computer Architecture & Assembly Language Spring 2001 Dr. Richard Spillman Lecture 19 – IO II.
DIRECT MEMORY ACCESS and Computer Buses
Department of Computer Science and Engineering
Bus Interfacing Processor-Memory Bus Backplane Bus I/O Bus
Chapter Seven.
Computer Architecture
Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: illusion of having more physical memory program relocation protection.
Input-output I/O is very much architecture/system dependent
Presentation transcript:

Interfacing Processors and Peripherals Andreas Klappenecker CPSC321 Computer Architecture

Collection of I/O Devices Communication between I/O devices, processor and memory use protocols on the bus and interrupts

Impact of I/O on Performance A benchmark executes in 100 seconds 90 seconds CPU time 10 seconds I/O time If CPU improves 50% per year for next 5 years, how much faster does the benchmark run in 5 years? 90/(1.5) 5 = 90/7.59 =

I/O Devices Very diverse devices — behavior (i.e., input vs. output) — partner (who is at the other end?) — data rate

Communicating with Processor Polling simple I/O device puts information in a status register processor retrieves information check the status periodically Interrupt driven I/O device notifies processor that it has completed some operation by causing an interrupt similar to exception, except that it is asynchronous processor must be notified of the device csng interrupt interrupts must be prioritized

I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5 / RPM) — transfer: grab the data (one or more sectors) 2 to 15 MB/sec

I/O Example: Buses Shared communication link (one or more wires) Difficult design: — may be bottleneck — tradeoffs (buffers for higher bandwidth increases latency) — support for many different devices — cost Types of buses: — processor-memory (short high speed, custom design) — backplane (high speed, often standardized, e.g., PCI) — I/O (lengthy, different devices, standardized, e.g., SCSI) Synchronous vs. Asynchronous — use a clock and a synchronous protocol, fast and small, but every device must operate at same rate and clock skew requires the bus to be short — don’t use a clock - use handshaking instead

Asynchronous Handshake Protocol ReadyReq: Indicates a read request from memory DataRdy: Indicates that data word is now ready on data lines Ack: Used to acknowledge the ReadyReq or DataRdy signal of the other party

Asynchronous Handshake Protocol 1. Memory sees ReadReq, reads address from data bus, raises Ack 2. I/O device sees Ack high, releases ReadReq and data lines 3. Memory sees ReadReq low, drops Ack to acknowledge ReadReq 4. When memory has data ready, it places data from the read request on the data lines and raises DataRdy 5. I/O devices sees DataRdy, reads data from the bus, signals that it has the data by raising Ack 6. Memory sees the Ack signal, drops DataRdy, releases datalines 7. If DataRdy goes low, the I/O device drops Ack to indicate that transmission is over

Synchronous vs. Asynchronous Buses Compare max. bandwidth for a synchronous bus and an asynchronous bus Synchronous bus has clock cycle time of 50 ns each transmission takes 1 clock cycle Asynchronous bus requires 40 ns per handshake Find bandwidth for each bus when performing one- word reads from a 200ns memory

Synchronous Bus 1. Send address to memory: 50 ns 2. Read memory: 200 ns 3. Send data to device: 50ns 4. Total: 300 ns 5. Max. bandwidth: 1. 4 bytes/300ns = 13.3 MB/second

Asynchronous Bus Apparently much slower because each step of the protocol takes 40 ns and memory access 200 ns Notice that several steps are overlapped with memory access time Memory receives address at step 1 does not need to put address until step 5 steps 2,3,4 can overlap with memory access Step 1: 40 ns Step 2,3,4: max(3 x 40ns =120ns, 200 ns) Steps 5,6,7: 3x40ns = 120ns Total time 360ns max. bandwidth 4bytes/360ns=11.1MB/second

Other important issues Bus Arbitration: — daisy chain arbitration (not very fair) — centralized arbitration (requires an arbiter), e.g., PCI — self selection, e.g., NuBus used in Macintosh — collision detection, e.g., Ethernet Operating system: — polling, interrupts, DMA Performance Analysis techniques: — queuing theory — simulation — analysis, i.e., find the weakest link (see “I/O System Design”)

Overhead of Polling

Ways to Transfer Data between Memory and Device