Lecture 17: Storage and I/O EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014, Dr.

Slides:



Advertisements
Similar presentations
1  1998 Morgan Kaufmann Publishers Interfacing Processors and Peripherals.
Advertisements

Enhanced Availability With RAID CC5493/7493. RAID Redundant Array of Independent Disks RAID is implemented to improve: –IO throughput (speed) and –Availability.
Lecture 36: Chapter 6 Today’s topic –RAID 1. RAID Redundant Array of Inexpensive (Independent) Disks –Use multiple smaller disks (c.f. one large disk)
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.
S. Barua – CPSC 440 CHAPTER 8 INTERFACING PROCESSORS AND PERIPHERALS Topics to be covered  How to.
1  1998 Morgan Kaufmann Publishers Chapter 8 Interfacing Processors and Peripherals.
1 Interfacing Processors and Peripherals I/O Design affected by many factors (expandability, resilience) Performance: — access latency — throughput — connection.
OS Spring’03 Introduction Operating Systems Spring 2003.
Chapter 8: Part II Storage, Network and Other Peripherals.
I/O Systems and Storage Systems May 22, 2000 Instructor: Gary Kimura.
Chapter 6 Storage and Other I/O Topics CprE 381 Computer Organization and Assembly Level Programming, Fall 2013 Zhao Zhang Iowa State University Revised.
1 Instant replay  The semester was split into roughly four parts. —The 1st quarter covered instruction set architectures—the connection between software.
Input & Output Systems Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
Computer Organization CS224 Fall 2012 Lesson 51. Measuring I/O Performance  I/O performance depends on l Hardware: CPU, memory, controllers, buses l.
Chapter 6 RAID. Chapter 6 — Storage and Other I/O Topics — 2 RAID Redundant Array of Inexpensive (Independent) Disks Use multiple smaller disks (c.f.
Memory/Storage Architecture Lab Computer Architecture Lecture Storage and Other I/O Topics.
Storage & Peripherals Disks, Networks, and Other Devices.
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,
C OMPUTER O RGANIZATION AND D ESIGN The Hardware/Software Interface 5 th Edition Chapter 5 Storage and Other I/O Topics (condensed lecture)
Computer Organization CS224 Fall 2012 Lessons 49 & 50.
1 Input Output [Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and Irwin, PSU 2005]
N-Tier Client/Server Architectures Chapter 4 Server - RAID Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept RAID – Redundant Array.
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.
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.
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.
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.
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.
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,
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,
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
1 Lecture 23: Storage Systems Topics: disk access, bus design, evaluation metrics, RAID (Sections )
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.
Enhanced Availability With RAID CC5493/7493. RAID Redundant Array of Independent Disks RAID is implemented to improve: –IO throughput (speed) and –Availability.
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.
CSCE 385: Computer Architecture Spring 2014 Dr. Mike Turi I/O.
I/O Errors 1 Computer Organization II © McQuain RAID Redundant Array of Inexpensive (Independent) Disks – Use multiple smaller disks (c.f.
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
Multiple Platters.
Morgan Kaufmann Publishers Storage and Other I/O Topics
I/O System Chapter 5 Designed by .VAS.
Operating Systems (CS 340 D)
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
Mark Zbikowski and Gary Kimura
CSC3050 – Computer Architecture
Presentation transcript:

Lecture 17: Storage and I/O EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014, Dr. Rozier (UM)

I/O AND BUSES

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

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 Bus Examples FirewireUSB 2.0PCI ExpressSerial ATASerial Attached SCSI Intended useExternal Internal External Devices per channel Data width422/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 x86 PC I/O System

I/O Management I/O is mediated by the OS – Multiple programs share I/O resources Need protection and scheduling – I/O causes asynchronous interrupts Same mechanism as exceptions – I/O programming is fiddly OS provides abstractions to programs

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 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

Polling 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

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 – 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

Interrupts vs. Polling Which is better? Why? Break into groups

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

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

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

PERFORMANCE

Measuring I/O Performance I/O performance depends on – Hardware: CPU, memory, controllers, buses – Software: operating system, database management system, application – Workload: request rates and patterns I/O system design can trade-off between response time and throughput – Measurements of throughput often done with constrained response-time

Transaction Processing Benchmarks Transactions – Small data accesses to a DBMS – Interested in I/O rate, not data rate Measure throughput – Subject to response time limits and failure handling – ACID (Atomicity, Consistency, Isolation, Durability) – Overall cost per transaction Transaction Processing Council (TPC) benchmarks ( – TPC-APP: B2B application server and web services – TCP-C: on-line order entry environment – TCP-E: on-line transaction processing for brokerage firm – TPC-H: decision support — business oriented ad-hoc queries

File System & Web Benchmarks SPEC System File System (SFS) – Synthetic workload for NFS server, based on monitoring real systems – Results Throughput (operations/sec) Response time (average ms/operation) SPEC Web Server benchmark – Measures simultaneous user sessions, subject to required throughput/session – Three workloads: Banking, Ecommerce, and Support

Amdahl’s Law What was it again? Getting back to Chapter 1…

I/O vs. CPU Performance Amdahl’s Law – Don’t neglect I/O performance as parallelism increases compute performance Example – Benchmark takes 90s CPU time, 10s I/O time – Double the number of CPUs/2 years I/O unchanged YearCPU timeI/O timeElapsed time% I/O time now90s10s100s10% +245s10s55s18% +423s10s33s31% +611s10s21s47%

RELIABILITY

RAID Redundant Array of Inexpensive (Independent) Disks – Use multiple smaller disks (c.f. one large disk) – Parallelism improves performance – Plus extra disk(s) for redundant data storage Provides fault tolerant storage system – Especially if failed disks can be “hot swapped”

RAID 0 – No redundancy (“AID”?) – Doesn’t help with reliability, but does improve performance. How does it improve performance?

RAID 1 – Mirroring – Improves performance and reliability! – High overhead cost! How much?

RAID 2 Striped at bit level – Uses Hamming codes for reliability – To complex in practice – Not used often

Hamming Codes A way to detect errors

Hamming Codes Take the data and G Compute the product modulo 2 Data Result

Hamming Codes A way to detect errors

Hamming Codes A way to detect errors

Hamming Codes d0 = 0 d1 = 1 d2 = 1 d3 = 1 What are p1, p2, and p3?

RAID 3 An easier way to do correction Byte level striping Parity is XOR parity Disks spin in lock-step for easy striping Not used in practice due to lock-step req.

RAID 4 Block interleaved parity Parity computed as XOR of blocks

RAID 4 Given the following 4-bit blocks, what is the parity?

RAID 4 How to rebuild? 1011 XXXX 0001 P: 0101

RAID 5

Why is this better than RAID 4?

RAID 6 Adds additional Q redundancy. Requires additional syndrome computation

Galois Field Algebra Galois Field – also called a “finite field” – Contains a finite number of elements called it’s size.

Galois Field Algebra Introduce some new Galois field GF(m) For each block of data, we chose a corresponding element of the Galois field New syndrome is independent.

Non-standard and Complex RAID

RAID Summary RAID can improve performance and availability – High availability requires hot swapping Assumes independent disk failures – Too bad if the building burns down! See “Hard Disk Performance, Quality and Reliability ” –

I/O System Design Satisfying latency requirements – For time-critical operations – If system is unloaded Add up latency of components Maximizing throughput – Find “weakest link” (lowest-bandwidth component) – Configure to operate at its maximum bandwidth – Balance remaining components in the system If system is loaded, simple analysis is insufficient – Need to use queuing models or simulation

Next week How processors are manufactured Course synthesis