Chapter 6. Storage & Other I/O

Similar documents
Chapter 6. Storage and Other I/O Topics

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Computer Architecture Computer Science & Engineering. Chapter 6. Storage and Other I/O Topics BK TP.HCM

Storage. Hwansoo Han

Introduction I/O 1. I/O devices can be characterized by Behavior: input, output, storage Partner: human or machine Data rate: bytes/sec, transfers/sec

Chapter 6. Storage and Other I/O Topics. ICE3003: Computer Architecture Fall 2012 Euiseong Seo

Chapter 6. Storage and Other I/O Topics

Example Networks on chip Freescale: MPC Telematics chip

Chapter 6. Storage and Other I/O Topics. ICE3003: Computer Architecture Spring 2014 Euiseong Seo

Computer Systems Laboratory Sungkyunkwan University

Chapter 6. Storage and Other I/O Topics

Chapter 6. Storage and Other I/O Topics. Jiang Jiang

Thomas Polzer Institut für Technische Informatik

Chapter 6. Storage and Other I/O Topics

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili

Chapter 6 Storage and Other I/O Topics

Interconnecting Components

Storage. CS 3410 Computer System Organization & Programming

Readings. Storage Hierarchy III: I/O System. I/O (Disk) Performance. I/O Device Characteristics. often boring, but still quite important

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Storage Systems. Storage Systems

I/O CANNOT BE IGNORED

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

Lecture 23: Storage Systems. Topics: disk access, bus design, evaluation metrics, RAID (Sections )

Storage Technologies and the Memory Hierarchy

Memory Technology. Chapter 5. Principle of Locality. Chapter 5 Large and Fast: Exploiting Memory Hierarchy 1

I/O CANNOT BE IGNORED

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Replacement Policy: Which block to replace from the set?

Chapter 8. A Typical collection of I/O devices. Interrupts. Processor. Cache. Memory I/O bus. I/O controller I/O I/O. Main memory.

Where We Are in This Course Right Now. ECE 152 Introduction to Computer Architecture Input/Output (I/O) Copyright 2012 Daniel J. Sorin Duke University

Introduction to Input and Output

COMPUTER ORGANIZATION AND DESIGN

CS429: Computer Organization and Architecture

CS429: Computer Organization and Architecture

Lecture 13. Storage, Network and Other Peripherals

Administrivia. CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Disks (cont.) Disks - review

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

CS 33. Memory Hierarchy I. CS33 Intro to Computer Systems XVI 1 Copyright 2016 Thomas W. Doeppner. All rights reserved.

CSE 153 Design of Operating Systems

Memory Hierarchy Y. K. Malaiya

Computer Systems. Memory Hierarchy. Han, Hwansoo

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now?

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

CSCI-UA.0201 Computer Systems Organization Memory Hierarchy

Computer System Architecture

Key Points. Rotational delay vs seek delay Disks are slow. Techniques for making disks faster. Flash and SSDs

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

Computer Science 61C Spring Friedland and Weaver. Input/Output

EN1640: Design of Computing Systems Topic 07: I/O

Storage systems. Computer Systems Architecture CMSC 411 Unit 6 Storage Systems. (Hard) Disks. Disk and Tape Technologies. Disks (cont.

Secondary storage. CS 537 Lecture 11 Secondary Storage. Disk trends. Another trip down memory lane

CS 61C: Great Ideas in Computer Architecture. Input/Output

Advanced Parallel Architecture Lesson 4 bis. Annalisa Massini /2015

Random-Access Memory (RAM) CS429: Computer Organization and Architecture. SRAM and DRAM. Flash / RAM Summary. Storage Technologies

Foundations of Computer Systems

CSCI 350 Ch. 12 Storage Device. Mark Redekopp Michael Shindler & Ramesh Govindan

ECE232: Hardware Organization and Design

CSCI-GA Database Systems Lecture 8: Physical Schema: Storage

Chapter Seven Morgan Kaufmann Publishers

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

Module 6: INPUT - OUTPUT (I/O)

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware

CS143: Disks and Files

Computer Architecture CS 355 Busses & I/O System

COS 318: Operating Systems. Storage Devices. Vivek Pai Computer Science Department Princeton University

Lecture 23. Finish-up buses Storage

The Memory Hierarchy /18-213/15-513: Introduction to Computer Systems 11 th Lecture, October 3, Today s Instructor: Phil Gibbons

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102

COS 318: Operating Systems. Storage Devices. Jaswinder Pal Singh Computer Science Department Princeton University

CSE 120. Operating Systems. March 27, 2014 Lecture 17. Mass Storage. Instructor: Neil Rhodes. Wednesday, March 26, 14

Introduction to I/O and Disk Management

UNIT 2 Data Center Environment

Random Access Memory (RAM)

Introduction to I/O and Disk Management

FUNCTIONS OF COMPONENTS OF A PERSONAL COMPUTER

Concepts Introduced. I/O Cannot Be Ignored. Typical Collection of I/O Devices. I/O Issues

External Memory. Computer Architecture. Magnetic Disk. Outline. Data Organization and Formatting. Write and Read Mechanisms

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Quiz for Chapter 6 Storage and Other I/O Topics 3.10

CSE 153 Design of Operating Systems Fall 2018

Reading and References. Input / Output. Why Input and Output? A typical organization. CSE 410, Spring 2004 Computer Systems

Chapter 11. I/O Management and Disk Scheduling

CMSC 611: Advanced Computer Architecture

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security

COMP283-Lecture 3 Applied Database Management

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

Computer Architecture 计算机体系结构. Lecture 6. Data Storage and I/O 第六讲 数据存储和输入输出. Chao Li, PhD. 李超博士

CS61C : Machine Structures

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface

Computer Organization

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Computer Organization: A Programmer's Perspective

Page 1. Magnetic Disk Purpose Long term, nonvolatile storage Lowest level in the memory hierarchy. Typical Disk Access Time

Chapter 10: Mass-Storage Systems

COS 318: Operating Systems. Storage Devices. Kai Li Computer Science Department Princeton University

www-inst.eecs.berkeley.edu/~cs61c/

Flash memory talk Felton Linux Group 27 August 2016 Jim Warner

Disks and RAID. CS 4410 Operating Systems. [R. Agarwal, L. Alvisi, A. Bracy, E. Sirer, R. Van Renesse]

Transcription:

Chapter 6 Storage & Other I/O 5 components of a Computer Computer Processor (active) Control ( brain ) Datapath ( brawn ) Memory (passive) (where programs, data live when running) Devices Input Output Keyboard, Mouse Disk (where programs, data live when not running) Display, Printer 2

6.1 Motivation for Input/Output I/O is how humans interact with computers I/O gives computers long-term memory. I/O lets computers do amazing things. Computer without I/O like a car without wheels; great technology, but won t get you anywhere 3 Introduction I/O devices can be characterized by Behaviour: input, output, storage Partner: human or machine Data rate: bytes/sec, transfers/sec I/O bus connections 4

Interfacing Processors and Peripherals Processor Interrupts Cache Memory I/O bus Main memory I/O controller I/O controller I/O controller Disk Disk Graphics output Network 5 I/O System Characteristics Dependability is important Particularly for storage devices Performance measures Latency (response time) Throughput (bandwidth) Desktops & embedded systems Mainly interested in response time & diversity of devices Servers Mainly interested in throughput & expandability of devices 6

I/O Devices - Very diverse I/O Speed: bytes transferred per second (from mouse to display: million-to-1) Device Behavior Partner Data Rate (KBytes/s) Keyboard Input Human 0.01 Mouse Input Human 0.02 Voice output Output Human 5.00 Floppy disk Storage Machine 50.00 Laser Printer Output Human 100.00 Magnetic Disk Storage Machine 10,000.00 Network-LAN I or O Machine 10,000.00 Graphics Display Output Human 30,000.00 7 6.3 Disk Storage Spindle Actuator Head Platters (12) 8

6.3 Disk Storage Nonvolatile, rotating magnetic storage 9 Disk Drives Sector org. 10 bytes header 512 Bytes data 12 bytes ECC 10

Disk Drives Platters Tracks Platter Sectors Track 11 Actuator Disk Device Terminology Arm Head Sector Inner Track Outer Track Platter Several platters, with information recorded magnetically on both surfaces (usually) Bits recorded in tracks, which in turn divided into sectors (e.g., 512 Bytes); error correction code per sector to find and correct errors Actuator moves head (end of arm) over track ( seek ), wait for sector rotate under head, then read or write 12

Disk Sectors and Access Each sector records Sector ID Data (512 bytes, 4096 bytes proposed) Error correcting code (ECC) Used to hide defects and recording errors Synchronization fields and gaps Access to a sector involves Queuing delay if other accesses are pending Seek: move the heads Rotational latency Data transfer, Controller overhead 13 Disk drive capacities A high-capacity disk drive may have 512 bytes per sector, 1,000 sectors per track, 5,000 tracks per surface, and 8 platters. The total capacity of this drive is C = 512 bytes/sector* 1000 sectors/track * 5000 tracks/surface * 8 platters *2surfaces/platter = 38 GB. 14

Disk Device Performance Platter Outer Track Inner Sector Head Arm Controller Track Spindle Actuator Disk Latency = Seek Time + Rotation Time + Transfer Time + Controller Overhead Seek Time depends no. tracks move arm, seek speed of disk Rotation Time depends on speed disk rotates, how far sector is from head Transfer Time depends on data rate (bandwidth) of disk (bit density), size of request 15 Disk drive speeds To access data: seek: position head over the proper track (8 to 20 ms. avg.) rotational latency: wait for desired sector (.5 / RPM) transfer: grab the data (one or more sectors) 2 to 15 MB/sec Controller time: overhead the controller imposes in I/O access. Disk Read Time = Average seek time + average rotational delay + transfer time + controller overhead What is the average time to read or write a 512-byte sector for a typical disk rotating at 5400 RPM? The average seek time is 12 ms, the transfer rate 5MB/sec, and the controller overhead is 2ms. Rotational delay = 0.5 rotation/5400rmp = 5.6 ms 12ms + 5.6ms + 0.5KB/5MB/sec + 2ms = 19.7 ms 16

Another Disk Access Example Given 512B sector, 15,000rpm, 4ms average seek time, 100MB/s transfer rate, 0.2ms controller overhead, idle disk Average read time 4ms seek time + ½ / (15,000/60) = 2ms rotational latency + 512 / 100MB/s = 0.005ms transfer time + 0.2ms controller delay = 6.2ms If actual average seek time is 1ms Average read time = 3.2ms 17 Disk Performance Issues Manufacturers quote average seek time Based on all possible seeks Locality and OS scheduling lead to smaller actual average seek times Smart disk controller allocate physical sectors on disk Present logical sector interface to host SCSI, ATA, SATA Disk drives include caches Prefetch sectors in anticipation of access Avoid seek and rotational delay 18

6.4 Flash Storage Nonvolatile semiconductor storage is a type of EEPROM chip (Electronically Erasable Programmable Read Only Memory). 100 1000 faster than disk Smaller, lower power, more robust But more $/GB (between disk and DRAM) 19 Example Use Your computer's BIOS chip CompactFlash (most often found in digital cameras) SmartMedia (most often found in digital cameras) Memory Stick (most often found in digital cameras) PCMCIA Type I and Type II memory cards (used as solid-state disks in laptops) Memory cards for video game consoles, Cellular phone, Video/Music player Computer replacing hard drive? 20

Characteristics 21 A Flash Memory Cell A cell has two transistors (Control and Floating Gates) at each intersection. The floating gate's only link to the row, or wordline, is through the control gate. As long as this link is in place, the cell has a value of 1. To change the value to a 0 requires a curious process called Fowler-Nordheim tunneling 22

How Flash Memory works? Tunneling is used to alter the placement of electrons in the floating gate. An electrical charge, is applied to the floating gate. The charge comes from the column, or bitline, enters the floating gate and drains to a ground. This charge causes the floating-gate transistor to act like an electron gun. The excited electrons are pushed through and trapped on other side of the thin oxide layer, giving it a negative charge. 23 How Flash Memory works? A special device called a cell sensor monitors the level of the charge passing through the floating gate. If the flow through the gate is above the 50 percent threshold, it has a value of 1. When the charge passing through drops below the 50-percent threshold, the value changes to 0. A blank EEPROM has all of the gates fully open, giving each cell a value of 1. 24

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

6.5 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 27 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 28

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 29 I/O Bus Examples Firewire USB 2.0 PCI Express Serial ATA Serial Attached SCSI Intended use External External Internal Internal External Devices per channel 63 127 1 1 4 Data width 4 2 2/lane 4 4 Peak bandwidth Hot pluggable 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 Yes Yes Depends Yes Yes Max length 4.5m 5m 0.5m 1m 8m Standard IEEE 1394 USB Implementers Forum 300MB/s PCI-SIG SATA-IO INCITS TC T10 30

Typical x86 PC I/O System 31 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 32

6.6 Interfacing I/O to Memory, CPU 1. Polling Check each I/O device in turn, schedule I/O work on appropriate idle devices Ask for device status (busy, wait, idle, dead ) 2. Interrupt-Driven On-demand request of I/O services Needs queue to save waiting I/O requests 3. Direct Memory Access (DMA) Direct I/O Device to Memory Transfer Very fast, used for large amounts of data (e.g., video, imagery, audio) 33 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 34

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

DMA 37 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 38

Instruction Set Architecture for I/O What must the processor do for I/O? Input: reads a sequence of bytes Output: writes a sequence of bytes 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 39 6.7 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 40

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 (www.tcp.org) 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 41 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 42

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?) Just stripe data over multiple disks But it does improve performance Chapter 6 Storage and Other I/O 43 RAID 1 & 2 RAID 1: Mirroring N + N disks, replicate data Write data to both data disk and mirror disk On disk failure, read from mirror RAID 2: Error correcting code (ECC) N + E disks (e.g., 10 + 4) Split data at bit level across N disks Generate E-bit ECC Too complex, not used in practice Chapter 6 Storage and Other I/O 44