I/O—I/O Busses Professor Alvin R. Lebeck Computer Science 220 Fall 2001.

Slides:



Advertisements
Similar presentations
Bus Design.
Advertisements

IT253: Computer Organization
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.
CSCE430/830 Computer Architecture
Datorteknik BusInterfacing bild 1 Bus Interfacing Processor-Memory Bus –High speed memory bus Backplane Bus –Processor-Interface bus –This is what we usually.
CSCE 212 Chapter 8 Storage, Networks, and Other Peripherals Instructor: Jason D. Bakos.
RAID Technology. Use Arrays of Small Disks? 14” 10”5.25”3.5” Disk Array: 1 disk design Conventional: 4 disk designs Low End High End Katz and Patterson.
IOSystems.1 Review: Major Components of a Computer Processor Control Datapath Memory Devices Input Output  Important metrics for an I/O system l Performance.
S. Barua – CPSC 440 CHAPTER 8 INTERFACING PROCESSORS AND PERIPHERALS Topics to be covered  How to.
Lecture 25 Buses and I/O (2)
Interfacing Processors and Peripherals Andreas Klappenecker CPSC321 Computer Architecture.
Computer ArchitectureFall 2007 © November 28, 2007 Karem A. Sakallah Lecture 24 Disk IO and RAID CS : Computer Architecture.
1  1998 Morgan Kaufmann Publishers Chapter 8 Interfacing Processors and Peripherals.
1 CSE SUNY New Paltz Chapters 8 Interfacing Processors and Peripherals.
1 Interfacing Processors and Peripherals I/O Design affected by many factors (expandability, resilience) Performance: — access latency — throughput — connection.
Computer ArchitectureFall 2008 © November 12, 2007 Nael Abu-Ghazaleh Lecture 24 Disk IO.
2. Methods for I/O Operations
Lecture 12 Today’s topics –CPU basics Registers ALU Control Unit –The bus –Clocks –Input/output subsystem 1.
Redundant Array of Inexpensive Disks (RAID). Redundant Arrays of Disks Files are "striped" across multiple spindles Redundancy yields high data availability.
Storage & Peripherals Disks, Networks, and Other Devices.
Lecture 4 1 Reliability vs Availability Reliability: Is anything broken? Availability: Is the system still available to the user?
MicroComputer Engineering Bus slide 1 What is a bus? Slow vehicle that many people ride together –well, true... A bunch of wires...
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
1 Chapter 7: Storage Systems Introduction Magnetic disks Buses RAID: Redundant Arrays of Inexpensive Disks.
Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.
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.
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Peripherals.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
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.
Top Level View of Computer Function and Interconnection.
3/8/2002CSE Buses Buses Pentium 4 Processor L1 and L2 caches Memory Controller Hub RDRAM Disks RDRAM I/O Controller Hub MB/sec (33 MHz, 32.
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.
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,
1 IKI10230 Pengantar Organisasi Komputer Bab 4.2: DMA & Bus 26 Maret 2003 Bobby Nazief Qonita Shahab bahan kuliah:
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.
Datorteknik F1 bild 1 What is a bus? Slow vehicle that many people ride together –well, true... A bunch of wires...
1 IKI20210 Pengantar Organisasi Komputer Kuliah No. 20: DMA & Standard I/O Bus 27 November 2002 Bobby Nazief Johny Moningka
EEE440 Computer Architecture
Datorteknik F1 bild 1 What is a bus? Slow vehicle that many people ride together –well, true... A bunch of wires...
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:
1 Lecture 14 Buses and I/O Data Transfer Peng Liu
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 26 Bus Interconnect May 7,
1  2004 Morgan Kaufmann Publishers Page Tables. 2  2004 Morgan Kaufmann Publishers Page Tables.
CMSC 611: Advanced Computer Architecture I/O & Storage Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
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.
Lecture 2. A Computer System for Labs
Buses: Presentation Outline
Interconnection Structures
Department of Computer Science and Engineering
Bus Interfacing Processor-Memory Bus Backplane Bus I/O Bus
RAID, Programmed I/O, Interrupt Driven I/O, DMA, Operating System
I/O System Chapter 5 Designed by .VAS.
What is a bus? Slow vehicle that many people ride together
Chapter 8-A BUS.
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
Buses: Presentation Outline
Overview of Computer Architecture and Organization
BUSES FUNCTIONAL UNITS Ch.Ramesh Embedded Systems.
Presentation transcript:

I/O—I/O Busses Professor Alvin R. Lebeck Computer Science 220 Fall 2001

2 © Alvin R. Lebeck 2001 CPS 220 Admin Homework #5 Due Nov 20 Projects… –Good writeup is very important (you’ve seen several papers…) Reading: –8.1, (Multiprocessors) –7.1-3, 7.5, 7.8 (Interconnection Networks)

3 © Alvin R. Lebeck 2001 CPS 220 Review: Storage System Issues Why I/O? Performance –queue + seek + rotational + transfer + overhead Processor Interface Issues –Memory Mapped –DMA (caches) I/O & Memory Buses Redundant Arrays of Inexpensive Disks (RAID)

4 © Alvin R. Lebeck 2001 CPS 220 Review: Processor Interface Issues Interconnections –Busses Processor interface –Instructions –Memory mapped I/O I/O Control Structures –Polling –Interrupts – Programmed I/O –DMA –I/O Controllers –I/O Processors

5 © Alvin R. Lebeck 2001 Review: Device Controllers Device Controller CommandStatusData 0 Data 1 Data n-1 BusyDoneError Bus Device Interrupt? Controller deals with mundane control (e.g., position head, error detection/correction) Processor communicates with Controller

6 © Alvin R. Lebeck 2001 CPS 220 I/O Data Flow Impediment to high performance: multiple copies, complex hierarchy

7 © Alvin R. Lebeck 2001 CPS 220 Communication Networks Performance limiter is memory system, OS overhead, not HW protocols Send/receive queues in processor OS memory Network controller copies back and forth via DMA No host intervention needed Interrupt host when message sent or received Memory-to-Memory copy to user space

8 © Alvin R. Lebeck 2001 Network Connected Devices High speed networks (10Gb Ethernet soon) How can we eliminate overheads? Page Flipping OS places aligned data into memory and remaps pages RDMA Idea is to eliminate kernel-to-user copy (User-level messaging) Requires “translation” on Network Interface (NI) Application registers region with OS OS stores pointer in NI On Receive, pointer says where data should go

9 © Alvin R. Lebeck 2001 Buses: Connecting I/O to Processor and Memory A bus is a shared communication link It uses one set of wires to connect multiple subsystems Control Datapath Memory Processor Input Output

10 © Alvin R. Lebeck 2001 Advantages of Buses Versatility: –New devices can be added easily –Peripherals can be moved between computer systems that use the same bus standard Low Cost: –A single set of wires is shared in multiple ways Memory Processor I/O Device

11 © Alvin R. Lebeck 2001 Disadvantages of Buses The bus creates a communication bottleneck –Bus bandwidth can limit the maximum I/O throughput The maximum bus speed is largely limited by: –The length of the bus –The number of devices on the bus –The need to support a range of devices with: »Widely varying latencies »Widely varying data transfer rates Memory Processor I/O Device

12 © Alvin R. Lebeck 2001 The General Organization of a Bus Control lines: –Signal requests and acknowledgments –Indicate what type of information is on the data lines Data lines carry information between the source and the destination: –Data and Addresses –Complex commands Data Lines Control Lines

13 © Alvin R. Lebeck 2001 Master versus Slave A bus transaction includes two parts: –Sending the address –Receiving or sending the data Master is the device that starts the bus transaction by: –Sending the address Slave is the device that responds to the address by: –Sending data to the master if the master ask for data –Receiving data from the master if the master wants to send data Bus Master Bus Slave Master send address Data can go either way

14 © Alvin R. Lebeck 2001 Output Operation Output: Processor sending data to the I/O device: Processor Control (Memory Read Request) Memory Step 1: Request Memory I/O Device (Disk) Data (Memory Address) Processor Control Memory Step 2: Read Memory I/O Device (Disk) Data Processor Control (Device Write Request) Memory Step 3: Send Data to I/O Device I/O Device (Disk) Data (I/O Device Address and then Data)

15 © Alvin R. Lebeck 2001 Input Operation °Input is defined as the Processor receiving data from the I/O device: Processor Control (Memory Write Request) Memory Step 1: Request Memory I/O Device (Disk) Data (Memory Address) Processor Control (I/O Read Request) Memory Step 2: Receive Data I/O Device (Disk) Data (I/O Device Address and then Data)

16 © Alvin R. Lebeck 2001 Types of Buses Processor-Memory Bus (design specific) –Short and high speed –Only need to match the memory system »Maximize memory-to-processor bandwidth –Connects directly to the processor External I/O Bus (industry standard) –Usually is lengthy and slower –Need to match a wide range of I/O devices –Connects to the processor-memory bus or backplane bus Backplane Bus (industry standard) –Backplane: an interconnection structure within the chassis –Allow processors, memory, and I/O devices to coexist –Cost advantage: one single bus for all components Bit-Serial Buses (New trend: USB, Firewire,.. ) –Use High speed unidirectional point-to-point communication

17 © Alvin R. Lebeck 2001 A Computer System with One Bus: Backplane Bus A single bus (the backplane bus) is used for: –Processor to memory communication –Communication between I/O devices and memory Advantages: Simple and low cost Disadvantages: slow and the bus can become a major bottleneck Example: Early IBM PC ProcessorMemory I/O Devices Backplane Bus

18 © Alvin R. Lebeck 2001 A Two-Bus System I/O buses tap into the processor-memory bus via bus adaptors: –Processor-memory bus: mainly for processor-memory traffic –I/O buses: provide expansion slots for I/O devices Example: Apple Macintosh-II –NuBus: Processor, memory, and a few selected I/O devices –SCCI Bus: the rest of the I/O devices ProcessorMemory I/O Bus Processor Memory Bus Bus Adaptor Bus Adaptor Bus Adaptor I/O Bus I/O Bus

19 © Alvin R. Lebeck 2001 A Three-Bus System A small number of backplane buses tap into the processor- memory bus –Processor-memory bus is used for processor memory traffic –I/O buses are connected to the backplane bus Advantage: loading on the processor bus is greatly reduced ProcessorMemory Processor Memory Bus Bus Adaptor Bus Adaptor Bus Adaptor I/O Bus Backplane Bus I/O Bus

20 © Alvin R. Lebeck 2001 CPS 220 I/O Bus Memory Bus Processor Cache Main Memory Disk Controller Disk Graphics Controller Network Interface Graphics Network interrupts The Many Buses of Today’s Systems I/O Bridge Core Chip Set

21 © Alvin R. Lebeck 2001 Synchronous and Asynchronous Bus Synchronous Bus: –Includes a clock in the control lines –A fixed protocol for communication that is relative to the clock –Advantage: involves very little logic and can run very fast –Disadvantages: »Every device on the bus must run at the same clock rate »To avoid clock skew, bus must be short if it is fast. Asynchronous Bus: –It is not clocked –It can accommodate a wide range of devices –It can be lengthened without worrying about clock skew –It requires a handshaking protocol

22 © Alvin R. Lebeck 2001 A Handshaking Protocol Three control lines –ReadReq: indicates a read request for memory Address is put on the data lines at the same line –DataRdy: indicates the data word is now ready on the data lines Data is put on the data lines at the same time –Ack: acknowledge the ReadReq or the DataRdy of the other party ReadReq AddressData Ack DataRdy

23 © Alvin R. Lebeck 2001 Increasing the Bus Bandwidth Separate versus multiplexed address and data lines: –Address and data can be transmitted in one bus cycle if separate address and data lines are available –Cost: (a) more bus lines, (b) increased complexity Data bus width: –By increasing the width of the data bus, transfers of multiple words require fewer bus cycles –Example: USB vs. 32-bit PCI vs. 64-bit PCI –Cost: more bus lines Block transfers: –Allow the bus to transfer multiple words in back-to-back bus cycles –Only one address needs to be sent at the beginning –The bus is not released until the last word is transferred –Cost: (a) increased complexity (b) decreased response time for request

24 © Alvin R. Lebeck 2001 Obtaining Access to the Bus One of the most important issues in bus design: –How is the bus reserved by a devices that wishes to use it? Chaos is avoided by a master-slave arrangement: –Only the bus master can control access to the bus: »It initiates and controls all bus requests –A slave responds to read and write requests The simplest system: –Processor is the only bus master –All bus requests must be controlled by the processor –Major drawback: the processor is involved in every transaction Bus Master Bus Slave Control: Master initiates requests Data can go either way

25 © Alvin R. Lebeck 2001 Multiple Potential Bus Masters: the Need for Arbitration Bus arbitration scheme: –A bus master wanting to use the bus asserts the bus request –A bus master cannot use the bus until its request is granted –A bus master must signal to the arbiter after finish using the bus Bus arbitration schemes usually try to balance two factors: –Bus priority: the highest priority device should be serviced first –Fairness: Even the lowest priority device should never be completely locked out from the bus Bus arbitration schemes can be divided into four broad classes: –Distributed arbitration by self-selection: each device wanting the bus places a code indicating its identity on the bus. –Distributed arbitration by collision detection: Ethernet uses this. –Daisy chain arbitration: single device with all request lines. –Centralized, parallel arbitration: see next-next slide

26 © Alvin R. Lebeck 2001 Centralized Bus Arbitration Master AMaster BMaster C Request-C Request-B Request-A Grant-C Grant-B Grant-A Arbitration Circuit Release

27 © Alvin R. Lebeck 2001 The Daisy Chain Bus Arbitration Scheme Advantage: simple Disadvantages: –Cannot assure fairness: A low-priority device may be locked out indefinitely –The use of the daisy chain grant signal also limits the bus speed Bus Arbiter Device 1 Highest Priority Device N Lowest Priority Device 2 Grant Release Request

28 © Alvin R. Lebeck 2001 Summary of Bus Options OptionHigh performanceLow cost Bus widthSeparate addressMultiplex address & data lines& data lines Data widthWider is fasterNarrower is cheaper (e.g., 64 bits)(e.g., 8 bits) Transfer sizeMultiple words hasSingle-word transfer less bus overheadis simpler Bus mastersMultipleSingle master (requires arbitration)(no arbitration) ClockingSynchronousAsynchronous

29 © Alvin R. Lebeck 2001 CPS 220 SCSI: Small Computer System Interface Up to 8 devices to communicate on a bus or “string” at sustained speeds of 4-5 MBytes/sec SCSI-2 up to 20 MB/sec Devices can be slave (“target”) or master(“initiator”) SCSI protocol: a series of ``phases", during which specif- ic actions are taken by the controller and the SCSI disks –Bus Free: No device is currently accessing the bus –Arbitration: When the SCSI bus goes free, multiple devices may request (arbitrate for) the bus; fixed priority by address –Selection: informs the target that it will participate (Reselection if disconnected) –Command: the initiator reads the SCSI command bytes from host memory and sends them to the target –Data Transfer: data in or out, initiator: target –Message Phase: message in or out, initiator: target (identify, save/restore data pointer, disconnect, command complete) –Status Phase: target, just before command complete

30 © Alvin R. Lebeck 2001 PCI Synchronous Bus 33 MHz, 66MHz 32-bit multiplexed Address/Data Bus –Can have 64-bit Data bus (32 are multiplexed with address) 132MB/s or 264MB/s Frame signal identifies start address phase, followed by one or more data phases –Can send 64-bit address over 32-bit bus, takes two cycles C/BE[3:0] during address phase indicates type –Memory read/write, I/O read/write, … C/BE[3:0] byte valid bits for data phase –Wait states supported by separate signals –Stop signal to terminate

31 © Alvin R. Lebeck 2001 PCI (continued) Centralized arbitration Pipelined with ongoing transfers Auto configuration to identify type (SCSI, Ethernet, etc.), manufacturer, I/O addresses, memory addresses, interrupt level, etc.

32 © Alvin R. Lebeck 2001 Accelerated Graphics Port (AGP) Overview Data Transfers Split Transaction Bus –Separate Bus Transaction for Address and Data –Increases controller complexity, but AGP shows advantages

33 © Alvin R. Lebeck 2001 CPS 220 Manufacturing Advantages of Disk Arrays 14” 10”5.25”3.5” Disk Array: 1 disk design Conventional: 4 disk designs Low End High End Disk Product Families

34 © Alvin R. Lebeck 2001 CPS 220 Redundant Arrays of Disks Files are "striped" across multiple spindles Redundancy yields high data availability Disks will fail Contents reconstructed from data redundantly stored in the array Capacity penalty to store it Bandwidth penalty to update Mirroring/Shadowing (high capacity cost) Horizontal Hamming Codes (overkill) Parity & Reed-Solomon Codes Failure Prediction (no capacity overhead!) Techniques:

35 © Alvin R. Lebeck 2001 CPS 220 Array Reliability Reliability of N disks = Reliability of 1 Disk ÷ N 50,000 Hours ÷ 70 disks = 700 hours Disk system MTTF: Drops from 6 years to 1 month! Arrays without redundancy too unreliable to be useful! Hot spares support reconstruction in parallel with access: very high media availability can be achieved Hot spares support reconstruction in parallel with access: very high media availability can be achieved

36 © Alvin R. Lebeck 2001 CPS 220 Redundant Arrays of Disks (RAID) Techniques Disk Mirroring, Shadowing Each disk is fully duplicated onto its "shadow" Logical write = two physical writes 100% capacity overhead Parity Data Bandwidth Array Parity computed horizontally Logically a single high data bw disk High I/O Rate Parity Array Interleaved parity blocks Independent reads and writes Logical write = 2 reads + 2 writes Parity + Reed-Solomon codes

37 © Alvin R. Lebeck 2001 CPS 220 Problems of Disk Arrays: Small Writes D0D1D2 D3 P D0' + + D1D2 D3 P' new data old data old parity XOR (1. Read) (2. Read) (3. Write) (4. Write) RAID-5: Small Write Algorithm 1 Logical Write = 2 Physical Reads + 2 Physical Writes

38 © Alvin R. Lebeck 2001 CPS 220 Redundant Arrays of Disks RAID 1: Disk Mirroring/Shadowing Each disk is fully duplicated onto its "shadow" Very high availability can be achieved Bandwidth sacrifice on write: Logical write = two physical writes Reads may be optimized Most expensive solution: 100% capacity overhead Targeted for high I/O rate, high availability environments recovery group

39 © Alvin R. Lebeck 2001 CPS 220 Redundant Arrays of Disks RAID 3: Parity Disk P logical record Striped physical records Parity computed across recovery group to protect against hard disk failures 33% capacity cost for parity in this configuration wider arrays reduce capacity costs, decrease expected availability, increase reconstruction time Arms logically synchronized, spindles rotationally synchronized logically a single high capacity, high transfer rate disk Targeted for high bandwidth applications: Scientific, Image Processing

40 © Alvin R. Lebeck 2001 CPS 220 Redundant Arrays of Disks RAID 5+: High I/O Rate Parity A logical write becomes four physical I/Os Independent writes possible because of interleaved parity Reed-Solomon Codes ("Q") for protection during reconstruction D0D1D2 D3 P D4D5D6 P D7 D8D9P D10 D11 PD16D17 D18 D19 D20D21D22 D23 P Disk Columns Increasing Logical Disk Addresses Targeted for mixed applications D12PD13 D14 D15 Stripe Unit

41 © Alvin R. Lebeck 2001 CPS 220 Next Time Multiprocessors