CMSC 611: Advanced Computer Architecture

Slides:



Advertisements
Similar presentations
I/O InterfaceCS510 Computer ArchitecturesLecture Lecture 17 I/O Interfaces and I/O Busses.
Advertisements

IT253: Computer Organization
I/O Chapter 8. Outline Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
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.
CPE 442 io.1 Introduction To Computer Architecture CpE 442 I/O Systems.
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.
EE30332 Ch8 DP – 1 Ch 8 Interfacing Processors and Peripherals Buses °Fundamental tool for designing and building computer systems divide the problem into.
Computer ArchitectureFall 2007 © November 28, 2007 Karem A. Sakallah Lecture 24 Disk IO and RAID CS : Computer Architecture.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
1  1998 Morgan Kaufmann Publishers Chapter 8 Storage, Networks and Other Peripherals.
Computer ArchitectureFall 2008 © November 12, 2007 Nael Abu-Ghazaleh Lecture 24 Disk IO.
I/0 devices.
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?
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Storage Systems.
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
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.
The Big Picture: Where are We Now?
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
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.
August 1, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 9: I/O Devices and Communication Buses * Jeremy R. Johnson Wednesday,
CS2100 Computer Organisation Input/Output – Own reading only (AY2015/6) Semester 1 Adapted from David Patternson’s lecture slides:
Csci 136 Computer Architecture II – IO and Storage Systems Xiuzhen Cheng
Adapted from Computer Organization and Design, Patterson & Hennessy ECE232: Hardware Organization and Design Part 17: Input/Output Chapter 6
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.
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 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.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 25 I/O Systems May 2,
LECTURE 13 I/O. I/O CANNOT BE IGNORED Assume a program requires 100 seconds, 90 seconds for main memory, 10 seconds for I/O. Assume main memory access.
CMSC 611: Advanced Computer Architecture Shared Memory Directory Protocol Most slides adapted from David Patterson. Some from Mohomed Younis.
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.
File organization Secondary Storage Devices Lec#7 Presenter: Dr Emad Nabil.
Input / Output Chapter 9.
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Multiple Platters.
RAID, Programmed I/O, Interrupt Driven I/O, DMA, Operating System
I/O System Chapter 5 Designed by .VAS.
Vladimir Stojanovic & Nicholas Weaver
Operating Systems (CS 340 D)
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
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.
CSCI 315 Operating Systems Design
Lecture 13 I/O.
ICOM 6005 – Database Management Systems Design
Input-output I/O is very much architecture/system dependent
Lecture 28: Reliability Today’s topics: GPU wrap-up Disk basics RAID
I/O Systems I/O Hardware Application I/O Interface
Operating System Concepts
Peng Liu Lecture 14 I/O Peng Liu
UNIT IV RAID.
CSC3050 – Computer Architecture
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

CMSC 611: Advanced Computer Architecture I/O, Storage & Networks Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / © 2003 Elsevier Science

Input/Output I/O Interface Design Issues Impact on Tasks Computer Processor Computer Control Datapath Memory Devices Input Output Network I/O Interface Device drivers Device controller Service queues Interrupt handling Design Issues Performance Expandability Standardization Resilience to failure Impact on Tasks Blocking conditions Priority inversion Access ordering

Impact of I/O on System Performance Suppose we have a benchmark that executes in 100 seconds of elapsed time, where 90 seconds is CPU time and the rest is I/O time. If the CPU time improves by 1.5x per year for the next five years but I/O time does not improve, how much faster will our program run at the end of the five years? Answer: Elapsed Time = CPU time + I/O time Over five years: CPU improvement = 90/12 = 7. BUT System improvement = 100/22 = 4.5

I/O Device Examples Device Behavior Partner Data Rate Keyboard Input Human 10 B/s Mouse Input Human 500 B/s Printer Output Human 10 MB/s Optical Disk Storage Machine 20 MB/s Magnetic Disk Storage Machine 300 MB/s SSD Storage Machine 200-2500 MB/s Network-LAN Input or Output Machine 10–100 MB/s Graphics Display Output Human 400 MB/s

Typical I/O System Processor Cache Memory - I/O Bus Main Memory I/O Controller Disk Graphics Network interrupts The connection between the I/O devices, processor, and memory is usually called a (local or internal) bus Communication among the devices and the processor use both protocols on the bus and interrupts

Polling: Programmed I/O CPU IOC device Memory while(! done()){ while(! ready()){} read(data); process(data); } busy wait loop not an efficient way to use the CPU unless the device is very fast! while(!done()){ while(ready()) { read(data); process(data); } do_other_stuff(); but checks for I/O completion can be dispersed among computation intensive code Advantage: Simple: the processor is totally in control and does all the work Disadvantage: Polling overhead can consume a lot of CPU time

Interrupt Driven Data Transfer add sub and or nop CPU IOC device Memory user program (1) I/O interrupt (2) save PC (3) interrupt service addr read store ... rti interrupt service routine : (4) memory Advantage: User program progress is only halted during actual transfer Disadvantage: special hardware is needed to: Cause an interrupt (I/O device) Detect an interrupt (processor) Save the proper states to resume after the interrupt (processor)

I/O Interrupt vs. Exception An I/O interrupt is just like the exceptions except: An I/O interrupt is asynchronous Further information needs to be conveyed Typically exceptions are more urgent than interrupts An I/O interrupt is asynchronous with respect to instruction execution: I/O interrupt is not associated with any instruction I/O interrupt does not prevent any instruction from completion You can pick your own convenient point to take an interrupt I/O interrupt is more complicated than exception: Needs to convey the identity of the device generating the interrupt Interrupt requests can have different urgencies: Interrupt request needs to be prioritized Priority indicates urgency of dealing with the interrupt high speed devices usually receive highest priority

Direct Memory Access Direct Memory Access (DMA): How does DMA work?: External to the CPU Use idle bus cycles (cycle stealing) Act as a master on the bus Transfer blocks of data to or from memory without CPU intervention Efficient for large data transfer, e.g. from disk Cache usage allows the processor to leave enough memory bandwidth for DMA CPU IOC device Memory DMAC CPU sends a starting address, direction, and length count to DMAC. Then issues "start". DMAC provides handshake signals for Peripheral Controller, and Memory Addresses and handshake signals for Memory. How does DMA work?: CPU sets up and supply device id, memory address, number of bytes DMA controller (DMAC) starts the access and becomes bus master For multiple byte transfer, the DMAC increment the address DMAC interrupts the CPU upon completion For multiple bus system, each bus controller often contains DMA control logic

DMA Problems With virtual memory systems: (pages would have physical and virtual addresses) Physical pages re-mapping to different virtual pages during DMA operations Multi-page DMA cannot assume consecutive addresses Solutions: Allow virtual addressing based DMA Add translation logic to DMA controller OS allocated virtual pages to DMA prevent re-mapping until DMA completes Partitioned DMA Break DMA transfer into multi-DMA operations, each is single page OS chains the pages for the requester In cache-based systems: (there can be two copies of data items) Processor might not know that the cache and memory pages are different Write-back caches can overwrite I/O data or makes DMA to read wrong data Route I/O activities through the cache Not efficient since I/O data usually is not demonstrating temporal locality OS selectively invalidates cache blocks before I/O read or force write-back prior to I/O write Usually called cache flushing and requires hardware support DMA allows another path to main memory with no cache and address translation

I/O Processor An I/O processor (IOP) offload the CPU Some processors, e.g. Motorola 860, include special purpose IOP for serial communication CPU IOP Mem D1 D2 Dn . . . main memory bus I/O OP Device Address target device where cmnds are IOP looks in memory for commands OP Addr Cnt Other what to do where to put data how much special requests CPU IOP (1) Issues instruction to IOP memory (2) (3) Device to/from memory transfers are controlled by the IOP directly. IOP steals memory cycles. (4) IOP interrupts CPU when done

Organization of a Hard Magnetic Disk Platters Track Sector Typical numbers (depending on the disk size): 500 to 2,000 tracks per surface 32 to 128 sectors per track A sector is the smallest unit that can be read or written to Traditionally all tracks have the same number of sectors: Constant bit density: record more sectors on the outer tracks Recently relaxed: constant bit size, speed varies with track location

Magnetic Disk Operation Cylinder Sector Track Head Platter Cylinder: all the tracks under the head at a given point on all surface Read/write is a three-stage process: Seek time position the arm over proper track Rotational latency wait for the sector to rotate under the read/write head Transfer time transfer a block of bits (sector) under the read-write head Average seek time (∑ time for all possible seeks) / (# seeks) Typically in the range of 8 ms to 12 ms Due to locality of disk reference, actual average seek time may only be 25% to 33% of the advertised number

Magnetic Disk Characteristic Rotational Latency: Most disks rotate at 5,400 to 10,000 RPM Approximately 11 ms to 6 ms per revolution, respectively An average latency to the desired information is halfway around the disk: 5.5 ms at 5400 RPM, 3 ms at 10000 RPM Transfer Time is a function of : Transfer size (usually a sector): 1 KB / sector Rotation speed: 5400 RPM to 10000 RPM Recording density: bits per inch on a track Diameter: typical diameter ranges from 2.5 to 5.25” Typical values ~500MB per second

Example Calculate the access time for a disk with 512 byte/sector and 12 ms advertised seek time. The disk rotates at 5400 RPM and transfers data at a rate of 4MB/sec. The controller overhead is 1 ms. Assume that the queue is idle (so no service time) Answer: Disk Time = Seek + Rotation + Transfer + Controller + Queue = 12 ms + .5/(5400 RPM) + 0.5 KiB / 4 MiB/s + 1 ms + 0 = 12 ms + .5/(90 R/s) + (0.125 / 1024) s + 1 ms + 0 = 12 ms + 5.5 ms + 0.1 ms + 1 ms + 0 = 18.6 ms If real seeks are 1/3 the advertised seeks, disk access time would be 10.6 ms, with rotation delay contributing 50% of the access time!

Reliability and Availability Two terms that are often confused: Reliability: Is anything broken? Availability: Is the system still available to the user? Availability can be improved by adding hardware: Example: adding ECC on memory Reliability can only be improved by: Enhancing environmental conditions Building more reliable components Building with fewer components Improve availability may come at the cost of lower reliability

Disk Arrays Increase potential throughput by having many disk drives: Data is spread over multiple disk Multiple accesses are made to several disks Reliability is lower than a single disk: 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! But availability can be improved by adding redundant disks (RAID): Lost information can be reconstructed from redundant information

Redundant Arrays of Disks Redundant Array of Inexpensive Disks (RAID) Widely available and used in today’s market Files are "striped" across multiple spindles Redundancy yields high data availability despite low reliability Contents of a failed disk is reconstructed from data redundantly stored in the disk array Drawbacks include capacity penalty to store redundant data and bandwidth penalty to update a disk block Different levels based on replication level and recovery techniques

RAID 1: Disk Mirroring/Shadowing recovery group 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

RAID 3: Parity Disk 10010011 11001101 . . . logical record 1 1 1 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

Block-Based Parity Block-based parity leads to more efficient read access compared to RAID 3 Designating a parity disk allows recovery but will keep it idle in the absence of a disk failure RAID 5 distribute the parity block to allow the use of all disk and enhance parallelism of disk access RAID 4 RAID 5

RAID 5+: High I/O Rate Parity Increasing Logical Disk Addresses P A logical write becomes four physical I/Os Independent writes possible because of interleaved parity Reed-Solomon Codes ("Q") for protection during reconstruction D4 D5 D6 P D7 D8 D9 P D10 D11 D12 P D13 D14 D15 Stripe P D16 D17 D18 D19 Stripe Unit D20 D21 D22 D23 P . . . . . Disk Columns

Problems of Small Writes RAID-5: Small Write Algorithm 1 Logical Write = 2 Physical Reads + 2 Physical Writes D0' D0 D1 D2 D3 P new data old data old parity (1. Read) (2. Read) + XOR + XOR (3. Write) (4. Write) D0' D1 D2 D3 P'

Subsystem Organization host host adapter array controller single board disk controller manages interface to host, DMA single board disk controller control, buffering, parity logic single board disk controller physical device control single board disk controller striping software off-loaded from host to array controller no applications modifications no reduction of host performance often piggy-backed in small format devices

System Availability: Orthogonal RAIDs Array Controller String . . . Data Recovery Group: unit of data redundancy Redundant Support Components: fans, power supplies, controller, cables End to End Data Integrity: internal parity protected data paths

Interconnection Networks Massively parallel processor networks (MPP) Thousands of nodes Short distance (<~25m) Traffic among nodes Local area network (LAN) Hundreds of computers A few kilometers Many-to-one (clients-server) Wide area network (WAN) Thousands of computers Thousands of kilometers

ABCs of Networks Rules for communication are called the “protocol”, message header and data called a "packet" What if more than 2 computers want to communicate? Need computer “address field” (destination) in packet What if packet is garbled in transit? Add “error detection field” in packet (e.g., CRC) What if packet is lost? Time-out, retransmit; ACK & NACK What if multiple processes/machine? Queue per process to provide protection

Performance Metrics Bandwidth: maximum rate of propagating information Sender Overhead Transmission time (size ÷ bandwidth) Sender (processor busy) Time of Flight Time of Flight Transmission time (size ÷ bandwidth) Receiver Overhead Receiver (processor busy) Transport Latency Total Latency Easy to get these things confused! Colors should help Min (link BW, bisection BW) Assumes no congestion Receiver usually longer Better to send then receive Store Like send Read like Receive Bandwidth: maximum rate of propagating information Time of flight: time for 1st bit to reach destination Overhead: software & hardware time for encoding/decoding, interrupt handling, etc.

Network Interface Issues Where to connect network to computer? Cache consistency to avoid flushes memory bus Low latency and high bandwidth Standard interface card? I/O bus Typically, MPP uses memory bus; while LAN, WAN connect through I/O bus CPU Network Network $ I/O Controller I/O Controller L2 $ Memory Bus I/O bus Memory Bus Adaptor Ideal: high bandwidth, low latency, standard interface