1  1998 Morgan Kaufmann Publishers Interfacing Processors and Peripherals.

Slides:



Advertisements
Similar presentations
Chapter 6 I/O Systems.
Advertisements

Bus arbitration Processor and DMA controllers both need to initiate data transfers on the bus and access main memory. The device that is allowed to initiate.
Chapter 8 Interfacing Processors and Peripherals.
1 Lecture 22: I/O, Disk Systems Todays topics: I/O overview Disk basics RAID Reminder: Assignment 8 due Tue 11/21.
Homework Reading Machine Projects Labs
I/O InterfaceCS510 Computer ArchitecturesLecture Lecture 17 I/O Interfaces and I/O Busses.
Bus Design.
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.
Datorteknik BusInterfacing bild 1 Bus Interfacing Processor-Memory Bus –High speed memory bus Backplane Bus –Processor-Interface bus –This is what we usually.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Processor support devices Part 1:Interrupts and shared memory dr.ir. A.C. Verschueren.
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
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.
Lecture 25 Buses and I/O (2)
Interfacing Processors and Peripherals Andreas Klappenecker CPSC321 Computer Architecture.
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.
Chapter 8: Part II Storage, Network and Other Peripherals.
I/0 devices.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
INPUT/OUTPUT ARCHITECTURE By Truc Truong. Input Devices Keyboard Keyboard Mouse Mouse Scanner Scanner CD-Rom CD-Rom Game Controller Game Controller.
Lecture 12 Today’s topics –CPU basics Registers ALU Control Unit –The bus –Clocks –Input/output subsystem 1.
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.
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
CPU BASICS, THE BUS, CLOCKS, I/O SUBSYSTEM Philip Chan.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
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.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
August 1, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 9: I/O Devices and Communication Buses * Jeremy R. Johnson Wednesday,
MBG 1 CIS501, Fall 99 Lecture 18: Input/Output (I/O): Buses and Peripherals Michael B. Greenwald Computer Architecture CIS 501 Fall 1999.
Csci 136 Computer Architecture II – Buses and IO
CS2100 Computer Organisation Input/Output – Own reading only (AY2015/6) Semester 1 Adapted from David Patternson’s lecture slides:
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.
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)
I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.
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.
Department of Computer Science and Engineering
Bus Interfacing Processor-Memory Bus Backplane Bus I/O Bus
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.
Overview of Computer Architecture and Organization
Peng Liu Lecture 14 I/O Peng Liu
Overview of Computer Architecture and Organization
CSC3050 – Computer Architecture
Presentation transcript:

1  1998 Morgan Kaufmann Publishers Interfacing Processors and Peripherals

2  1998 Morgan Kaufmann Publishers I/O Devices

3  1998 Morgan Kaufmann Publishers Input/Output Very diverse devices –behaviour (i.e., input vs. output) –partner (who is at the other end?) –data rate Important but neglected –difficulties in assessing and designing I/O systems have often relegated I/O to second class status

4  1998 Morgan Kaufmann Publishers Input/Output I/O design affected by performance, expandability, resilience, etc. I/O System performance depends on: –CPU –memory system (caches, main memory) –buses –I/O controller –I/O device –I/O software (operating system) Performance metrics: –throughput: I/O bandwidth –response time: latency

5  1998 Morgan Kaufmann Publishers I/O Example: Disk Drives To access data: — seek: position head over the proper track (  6 ms) — rotational latency: wait for desired sector (  4 ms) — transfer: one or more sectors (  15 MB/s) Platter Track Platters Sectors Tracks

6  1998 Morgan Kaufmann Publishers Buses Shared communication link (one or more wires) Types of buses: –processor–memory (short, high speed, custom design) –backplane (high speed, often standardised, e.g., PCI) –I/O (lengthy, different devices, standardised, e.g., SCSI) Synchronous –use a clock and a synchronous protocol, fast and small –every device must operate at same rate –wait states possible –clock skew requires the bus to be short Asynchronous –doesn’t use a clock –uses handshaking

7  1998 Morgan Kaufmann Publishers Bus Design Difficult –may be a bottleneck –length of the bus –number of devices –tradeoffs (buffers for higher bandwidth increase latency) –support for many different devices –cost

8  1998 Morgan Kaufmann Publishers Bus Structures

9  1998 Morgan Kaufmann Publishers Bus Structures

10  1998 Morgan Kaufmann Publishers Synchronous Bus Transfer Example: Read T1T2T3 Clock Address lines Memory address Data lines memory Data accepted by processor AS R/W Data from From processor Bi- directional

11  1998 Morgan Kaufmann Publishers Synchronous Bus Transfer Example: Write T1T2T3 Clock Address lines Memory address Data lines AS R/W Data from processor From processor Bi- directional

12  1998 Morgan Kaufmann Publishers Synchronous Write with a Wait State T1T2T3 Clock Address lines Memory address Data lines AS R/W Data from processor From processor Bi- directional WAIT Tw WAIT checked by processor From memory

13  1998 Morgan Kaufmann Publishers Asynchronous Handshaking Example A device requests a word from the memory Three control lines –ReadReq: indicates a read request for memory –DataRdy: indicates the word is ready on the data lines –Ack: acknowledges the Req or Rdy signal of the other party

14  1998 Morgan Kaufmann Publishers Asynchronous Handshaking Waveforms DataRdy Ack Data ReadReq addressdata

15  1998 Morgan Kaufmann Publishers Controlling Bus Access A bus master controls access to the bus –it initiates and controls all bus requests –the slave responds to requests Single bus master –the processor Multiple bus masters –bus arbitration

16  1998 Morgan Kaufmann Publishers Bus Arbitration daisy chain arbitration –bus granted in priority order –a grant line runs through the devices centralized, parallel arbitration –centralised arbiter chooses from among requesting devices –e.g., PCI distributed arbitration by self-selection –each requesting device makes a request on the bus and determines independently who has the highest priority –e.g., NuBus used in Macintosh distributed arbitration by collision detection –each device independently requests the bus, collisions are detected –e.g., Ethernet

17  1998 Morgan Kaufmann Publishers Operating system Responsibilities of the OS arise from –I/O system is shared by multiple programs –I/O systems often use interrupts –low-level control of an I/O device is complex: concurrent events, detailed requirements Functions the OS must provide –protection, by maintaining user rights –abstractions for accessing devices –interrupt handling –equitable access to shared I/O resources Three types of communication –OS gives commands to the devices –devices notify the OS when operations are completed –data transfer between memory and an I/O device

18  1998 Morgan Kaufmann Publishers Giving Commands to I/O Devices Special I/O instructions specifying –device number –command word Memory-mapped I/O –portions of the address space are assigned to I/O devices –those addresses are used by the control, status and data registers of the devices –reads and writes to those addresses are interpreted as commands to the I/O devices –user programs are prevented from issuing I/O operations directly

19  1998 Morgan Kaufmann Publishers Communicating with the Processor The OS needs to know when –the I/O device has completed an operation –the I/O operation has encounted an error Methods –polling –interrupt-driven I/O Polling –the I/O devices put information in status registers –the OS periodically checks the status registers –simple: the processor is totally in control and does all the work –consumes a lot of processor time

20  1998 Morgan Kaufmann Publishers Communicating with the Processor Interrupt-driven I/O –I/O interrupts are just like exceptions except: an I/O interrupt is asynchronous further information needs to be conveyed –interrupts indicate to the processor that an I/O device needs attention –user program progress is only halted but special hardware is needed to send a request (device) detect an interrupt (processor) save the CPU state during the interrupt service routine (processor)

21  1998 Morgan Kaufmann Publishers Direct Memory Access External to the CPU Direct transfer of data to or from the memory without involving the processor The DMA controller becomes the bus master and directs the reads and writes Steps in a DMA transfer –the processor supplies the identity of the device, the operation, the memory address and the number of bytes –the DMA controller completes the operation without bothering the processor –the DMA controller interrupts the processor to inform that the transfer is complete