Computer Organization CS224 Fall 2012 Lessons 47 & 48.

Slides:



Advertisements
Similar presentations
I/O Chapter 8. Outline Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
Advertisements

Princess Sumaya Univ. Computer Engineering Dept. Chapter 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.
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.
EE30332 Ch8 DP – 1 Ch 8 Interfacing Processors and Peripherals Buses °Fundamental tool for designing and building computer systems divide the problem into.
1  1998 Morgan Kaufmann Publishers Chapter 8 Storage, Networks and Other Peripherals.
11/18/2004Comp 120 Fall November 3 classes to go No class on Tuesday 23 November Last 2 classes will be survey and exam review Interconnect and.
1  1998 Morgan Kaufmann Publishers Chapter 8 Interfacing Processors and Peripherals.
Chapter 8: Part II Storage, Network and Other Peripherals.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Chapter 6 Storage and Other I/O Topics CprE 381 Computer Organization and Assembly Level Programming, Fall 2013 Zhao Zhang Iowa State University Revised.
Input & Output Systems Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
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.
Computer Input & Output Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
C OMPUTER O RGANIZATION AND D ESIGN The Hardware/Software Interface 5 th Edition Chapter 5 Storage and Other I/O Topics (condensed lecture)
1 Input Output [Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and Irwin, PSU 2005]
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.
I/O 1 Computer Organization II © McQuain Introduction I/O devices can be characterized by – Behavior: input, output, storage – Partner:
University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell CS352H: Computer Systems Architecture Topic 13: I/O Systems.
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 Lecture notes from MKP and S. Yalamanchili. (2) Introduction I/O devices can be characterized by  Behavior: input, output, storage  Partner: human.
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.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
Lecture 16: Storage and I/O EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014, Dr.
I/O Computer Organization II 1 Introduction I/O devices can be characterized by – Behavior: input, output, storage – Partner: human or machine – Data rate:
Lecture 35: Chapter 6 Today’s topic –I/O Overview 1.
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,
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
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.
Five Components of Computers Input Output Memory Control Datapath Processor.
Chapter 6 Storage and Other I/O Topics. Chapter 6 — Storage and Other I/O Topics — 2 Introduction I/O bus connections §6.1 Introduction.
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,
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,
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 Lecture 14 Buses and I/O Data Transfer Peng Liu
CS 6290 I/O and Storage Milos Prvulovic. Storage Systems I/O performance (bandwidth, latency) –Bandwidth improving, but not as fast as CPU –Latency improving.
1 Lecture 23: Storage Systems Topics: disk access, bus design, evaluation metrics, RAID (Sections )
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
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,
Chapter 6 — Storage and Other I/O Topics — 1 Introduction I/O devices can be characterized by Behaviour: input, output, storage Partner: human or machine.
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,
Modified by S. J. Fritz Spring 2009 (1) Based on slides from D. Patterson and www-inst.eecs.berkeley.edu/~cs152/ COM 249 – Computer Organization and Assembly.
Computer Organization & Design 计算机组成与设计 Weidong Wang ( 王维东 ) College of Information Science & Electronic Engineering 信息与通信工程研究所 Zhejiang.
CSCE 385: Computer Architecture Spring 2014 Dr. Mike Turi I/O.
I/O Lecture notes from MKP and S. Yalamanchili.
I/O Lecture notes from MKP and S. Yalamanchili.
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Morgan Kaufmann Publishers Storage and Other I/O Topics
Virtual Memory Lecture notes from MKP and S. Yalamanchili.
Morgan Kaufmann Publishers Storage and Other I/O Topics
Operating Systems (CS 340 D)
The Memory Hierarchy Chapter 5
Computer Architecture
Introduction I/O devices can be characterized by I/O bus connections
Morgan Kaufmann Publishers Storage and Other I/O Topics
Morgan Kaufmann Publishers Storage and Other I/O Topics
Peng Liu Lecture 14 I/O Peng Liu
Morgan Kaufmann Publishers Storage and Other I/O Topics
CSC3050 – Computer Architecture
Chapter 13: I/O Systems.
Presentation transcript:

Computer Organization CS224 Fall 2012 Lessons 47 & 48

Introduction  I/O devices can be characterized by l Behaviour: input, output, storage l Partner: human or machine l Data rate: bytes/sec, transfers/sec  I/O bus connections §6.1 Introduction

I/O System Characteristics  Dependability is important l Particularly for storage devices  Performance measures l Latency (response time) l Throughput (bandwidth) l Desktops & embedded systems -Mainly interested in response time & diversity of devices l Servers -Mainly interested in throughput & expandability of devices

Dependability  Fault: failure of a component l May or may not lead to system failure §6.2 Dependability, Reliability, and Availability Service accomplishment Service delivered as specified Service interruption Deviation from specified service FailureRestoration

Dependability Measures  Reliability: mean time to failure (MTTF ) Fig 6.5)  Service interruption: mean time to repair (MTTR)  Mean time between failures l MTBF = MTTF + MTTR  Availability = MTTF / (MTTF + MTTR)  Improving Availability l Increase MTTF: fault avoidance (↑ quality), fault tolerance (w/ redundancy), fault forecasting (replace before failure) l Reduce MTTR: improved tools and processes for diagnosis and repair

Disk Storage  Nonvolatile, rotating magnetic storage §6.3 Disk Storage

Disk Sectors and Access  Each sector records l Sector ID l Data (512 bytes, 4096 bytes proposed) l Error correcting code (ECC) -Used to hide defects and recording errors l Synchronization fields and gaps  Access to a sector involves l Queuing delay if other accesses are pending l Seek: move the heads l Rotational latency (0.5 rotation, on average) l Data transfer l Controller overhead

Disk Access Example  Given l 512B sector, 15,000rpm, 4ms average seek time, 100MB/s transfer rate, 0.2ms controller overhead, idle disk  Average read time l 4ms seek time (c.f. mfg data sheet) + ½ / (15,000/60) = 2ms rotational latency + 512B / 100MB/s = 0.005ms transfer time + 0.2ms controller delay = 6.2ms  If actual average seek time is 1ms l Average read time = 3.2ms

Disk Performance Issues  Manufacturers quote average seek time l Based on all possible seeks l Locality and OS scheduling lead to smaller actual average seek times  Smart disk controller allocate physical sectors on disk l Present logical sector interface to host l SCSI, ATA, SATA  Disk drives include caches l Pre-fetch sectors in anticipation of access l Avoid seek and rotational delay

Flash Storage  Nonvolatile semiconductor storage l 100× – 1000× faster than disk l Smaller, lower power, more robust l But more $/GB (between disk and DRAM) §6.4 Flash Storage

Flash Types  NOR flash: bit cell like a NOR gate l Random read/write access l Used for instruction memory in embedded systems  NAND flash: bit cell like a NAND gate l Denser (bits/area), but block-at-a-time access l Cheaper per GB l Used for USB sticks, media storage, …  Flash bits wear out after 1000’s of accesses l Not suitable for direct RAM or disk replacement l Wear leveling: remap data to less used blocks

Interconnecting Components  Need interconnections between l CPU, memory, I/O controllers  Bus: shared communication channel l Parallel set of wires for data and synchronization of data transfer l Can become a bottleneck  Performance limited by physical factors l Wire length, number of connections  More recent alternative: high-speed serial connections with switches l Like networks §6.5 Connecting Processors, Memory, and I/O Devices

Bus Types  Processor-Memory buses l Short, high speed l Design is matched to memory organization  I/O buses l Longer, allowing multiple connections l Specified by standards for interoperability l Connect to processor-memory bus through a bridge

Bus Signals and Synchronization  Data lines l Carry address and data l Multiplexed or separate  Control lines l Indicate data type, synchronize transactions  Synchronous l Uses a bus clock  Asynchronous l Uses request/acknowledge control lines for handshaking

I/O Bus Examples FirewireUSB 2.0PCI ExpressSerial ATASerial Attached SCSI Intended useExternal Internal External Devices per channel Data width422 per lane44 Peak bandwidth 50MB/s or 100MB/s 0.2MB/s, 1.5MB/s, or 60MB/s 250MB/s/lane 1×, 2×, 4×, 8×, 16×, 32× 300MB/s Hot pluggable Yes DependsYes Max length4.5m5m0.5m1m8m StandardIEEE 1394USB Implementers Forum PCI-SIGSATA-IOINCITS TC T10

Typical Intel Server w/ I/O System

I/O Management  I/O is managed by the OS l Multiple programs share I/O resources -Need protection and scheduling l I/O causes asynchronous interrupts -Needs same mechanism as exceptions l I/O programming is detailed and complex -OS provides abstractions to programs -OS handles details in I/O subsystem §6.6 Interfacing I/O Devices …

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

I/O Register Mapping  Memory mapped I/O l I/O command, status and data registers are addressed in same space as memory l Address decoder distinguishes between them, sends to request to memory or to I/O l OS uses address translation mechanism to make them only accessible to kernel  I/O instructions l Separate instructions to access I/O registers l Can only be executed in kernel mode l Example: x86

Polling  Periodically check I/O status register l If device ready, do operation l If error, take action  Common in small or low-performance real-time embedded systems l Predictable timing l Low hardware cost l Usually just one process  In other systems, this waste of CPU time is undesirable

Interrupts  When a device is ready or error occurs l Controller interrupts CPU  Interrupt is like an exception l But not synchronized to instruction execution l Can invoke OS handler between instructions l Cause information often identifies the interrupting device  Priority interrupts l Devices needing more urgent attention get higher priority l Can interrupt handler for a lower priority interrupt

I/O Data Transfer  Polling and interrupt-driven I/O l CPU transfers data between memory and I/O data registers l Time consuming for high-speed devices  Direct memory access (DMA) l OS provides starting address in memory l I/O controller transfers to/from memory autonomously l Controller interrupts on completion or error l While DMA uses memory, processor uses cache; both can operate in parallel (in the ideal)

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