I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
1  1998 Morgan Kaufmann Publishers Interfacing Processors and Peripherals.
Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
Datorteknik BusInterfacing bild 1 Bus Interfacing Processor-Memory Bus –High speed memory bus Backplane Bus –Processor-Interface bus –This is what we usually.
Lecture Objectives: 1)Explain the limitations of flash memory. 2)Define wear leveling. 3)Define the term IO Transaction 4)Define the terms synchronous.
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.
Input-output and Communication Prof. Sin-Min Lee Department of Computer Science.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
OS Spring’03 Introduction Operating Systems Spring 2003.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 8: Part II Storage, Network and Other Peripherals.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Copyright ©: Nahrstedt, Angrave, Abdelzaher
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
Memory/Storage Architecture Lab Computer Architecture Lecture Storage and Other I/O Topics.
Lecture 17: Storage and I/O EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014, Dr.
CHAPTER 5 I/O PRINCIPLE Understand the principles of System Bus
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
I/O 1 Computer Organization II © McQuain Introduction I/O devices can be characterized by – Behavior: input, output, storage – Partner:
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
NETW 3005 I/O Systems. Reading For this lecture, you should have read Chapter 13 (Sections 1-4, 7). NETW3005 (Operating Systems) Lecture 10 - I/O Systems2.
MICROPROCESSOR INPUT/OUTPUT
I/O Systems I/O Hardware Application I/O Interface
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
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.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection Network Structure.
Lecture 35: Chapter 6 Today’s topic –I/O Overview 1.
Interrupts, Buses Chapter 6.2.5, Introduction to Interrupts Interrupts are a mechanism by which other modules (e.g. I/O) may interrupt normal.
Chapter 13: I/O Systems. 13.2/34 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware.
Computer Organization CS224 Fall 2012 Lessons 47 & 48.
MBG 1 CIS501, Fall 99 Lecture 18: Input/Output (I/O): Buses and Peripherals Michael B. Greenwald Computer Architecture CIS 501 Fall 1999.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
CS2100 Computer Organisation Input/Output – Own reading only (AY2015/6) Semester 1 Adapted from David Patternson’s lecture slides:
Introduction I/O devices can be characterized by – Behaviour: input, output, storage – Partner: human or machine – Data rate: bytes/sec, transfers/sec.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
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.
1 Lecture 14 Buses and I/O Data Transfer Peng Liu
بسم الله الرحمن الرحيم MEMORY AND I/O.
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.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
CSCE 385: Computer Architecture Spring 2014 Dr. Mike Turi I/O.
Lecture 2. A Computer System for Labs
I/O Lecture notes from MKP and S. Yalamanchili.
Bus Interfacing Processor-Memory Bus Backplane Bus I/O Bus
Module 12: I/O Systems I/O hardware Application I/O Interface
Morgan Kaufmann Publishers Storage and Other I/O Topics
I/O Systems I/O Hardware Application I/O Interface
Operating System Concepts
Lecture 14 Buses and I/O Data Transfer
Peng Liu Lecture 14 I/O Peng Liu
CSC3050 – Computer Architecture
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel – Parallel set of wires for data and synchronization of data transfer – Can become a bottleneck Performance limited by physical factors – Wire length, number of connections More recent alternative: high-speed serial connections with switches – Like networks

I/O Computer Organization II 2 Bus Types Processor-Memory buses – Short, high speed – Design is matched to memory organization – Goal: maximize processor-memory bandwidth I/O buses – Longer, allowing multiple connections – Specified by standards for interoperability – Connect to processor-memory bus through a bridge – Connect to a wide variety of devices, with wide range in data bandwidth

I/O Computer Organization II 3 Bus Signals and Synchronization Data lines – Carry address and data – Multiplexed or separate Control lines – Indicate data type, synchronize transactions Synchronous – Uses a bus clock Asynchronous – Uses request/acknowledge control lines for handshaking

I/O Computer Organization II 4 Synchronous Buses Uses a clock signal among the control lines and a fixed protocol for communication. For example, for a memory read operation: -transmit the address and read command on 1 st clock tick -require memory unit to respond with the requested data word on the 5 th clock tick Predetermined protocol allows, simple control logic, easily implemented as a small FSM. Bus can run fast. Every device on bus must run on same clock rate. Clock skew issues limit the physical length or the speed of the bus.

I/O Computer Organization II 5 Asynchronous Buses Uses request/acknowledge control lines for "handshaking". No clock signal is used (hence, asynchronous). Wide variety of devices can be connected on same bus. Bus can have greater (but not unlimited) length. All the examples in the following table are asynchronous buses.

I/O Computer Organization II 6 I/O Bus Examples FIGURE 6.8 Key characteristics of fi ve dominant I/O standards. The intended use row indicates whether it is designed to be used with cables external to the computer or just inside the computer with short cables or wire on printed circuit boards. PCIe can support simultaneous reads and writes, so some publications double the bandwidth per lane assuming a 50/50 split of read versus write band width.

I/O Computer Organization II 7 Typical x86 PC I/O System FIGURE 6.9 Organization of the I/O system on an Intel server using the Intel 5000P chip set. If you assume reads and writes are each half the traffic, you can double the bandwidth per link for PCIe.

I/O Computer Organization II 8 I/O Management How is a user request transformed into a device command and communicated to the device? How is data actually transferred to or from a memory location? What is the role of the OS? I/O is mediated by the OS – Multiple programs share I/O resources n Need protection and scheduling – I/O causes asynchronous interrupts n Same mechanism as exceptions – I/O programming is fiddly n OS provides abstractions to programs

I/O Computer Organization II 9 Role of the OS Guarantees that a user's program accesses only the parts of an I/O device to which the user has rights. Provides abstractions for accessing devices by supplying routines that handle low-level device operations. Handles interrupts generated by I/O devices. Tries to provide "equitable" access to shared I/O resources. Tries to schedule accesses to improve system throughput.

I/O Computer Organization II 10 I/O Commands I/O devices are managed by I/O controller hardware – Transfers data to/from device – Synchronizes operations with software Command registers – Cause device to do something Status registers – Indicate what the device is doing and occurrence of errors Data registers – Write: transfer data to a device – Read: transfer data from a device

I/O Computer Organization II 11 I/O Register Mapping Memory mapped I/O – Registers are addressed in same space as memory – Address decoder distinguishes between them – OS uses address translation mechanism to make them only accessible to kernel I/O instructions – Separate instructions to access I/O registers – Can only be executed in kernel mode – Example: x86

I/O Computer Organization II 12 Polling Processor must periodically check I/O status register – If device ready, do operation – If error, take action Common in small or low-performance real-time embedded systems – Predictable timing – Low hardware cost In other systems, wastes CPU time

I/O Computer Organization II 13 Interrupts When a device is ready or error occurs – Controller interrupts CPU Interrupt is like an exception – But not synchronized to instruction execution – Can invoke handler between instructions – Interrupt-cause information often identifies the interrupting device Priority interrupts – Devices needing more urgent attention get higher priority – Can interrupt handler for a lower priority interrupt

I/O Computer Organization II 14 I/O Data Transfer Polling and interrupt-driven I/O – CPU transfers data between memory and I/O data registers – Time consuming for high-speed devices Direct memory access (DMA) – OS provides starting address in memory – I/O controller transfers to/from memory autonomously – Controller interrupts on completion or error

I/O Computer Organization II 15 DMA/Cache Interaction If DMA writes to a memory block that is cached – Cached copy becomes stale If write-back cache has dirty block, and DMA reads memory block – Reads stale data Need to ensure cache coherence – Flush blocks from cache if they will be used for DMA – Or use non-cacheable memory locations for I/O

I/O Computer Organization II 16 DMA/VM Interaction OS uses virtual addresses for memory – DMA blocks may not be contiguous in physical memory Should DMA use virtual addresses? – Would require controller to do translation If DMA uses physical addresses – May need to break transfers into page-sized chunks – Or chain multiple transfers – Or allocate contiguous physical pages for DMA