Chapter 6 Storage and Other I/O Topics

Similar documents
Storage. Hwansoo Han

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

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

Chapter 6. Storage and Other I/O Topics

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

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

Thomas Polzer Institut für Technische Informatik

Chapter 6. Storage and Other I/O Topics

Chapter 6. Storage and Other I/O Topics

Chapter 6. Storage & Other I/O

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. ICE3003: Computer Architecture Spring 2014 Euiseong Seo

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

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

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.

Lecture 13. Storage, Network and Other Peripherals

Chapter 5 Large and Fast: Exploiting Memory Hierarchy (Part 1)

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

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

Chapter Seven Morgan Kaufmann Publishers

Storage. CS 3410 Computer System Organization & Programming

Storage Systems. Storage Systems

Bus AMBA. Advanced Microcontroller Bus Architecture (AMBA)

Introduction to Input and Output

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

IO System. CP-226: Computer Architecture. Lecture 25 (24 April 2013) CADSL

Computer Systems Laboratory Sungkyunkwan University

I/O CANNOT BE IGNORED

I/O CANNOT BE IGNORED

Computer Science 146. Computer Architecture

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

Adapted from instructor s supplementary material from Computer. Patterson & Hennessy, 2008, MK]

Chapter 5 Large and Fast: Exploiting Memory Hierarchy (Part 2)

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

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

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

Example Networks on chip Freescale: MPC Telematics chip

Lecture 23. Finish-up buses Storage

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

Chapter 3: Loaders and Linkers

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

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

Chapter 6. I/O issues

Chapter 4 The Processor (Part 4)

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Appendix D: Storage Systems

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

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

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

Computer Architecture. Hebrew University Spring Chapter 8 Input/Output. Big Picture: Where are We Now?

Virtual Memory Input/Output. Admin

Memory Systems for Embedded Applications. Chapter 4 (Sections )

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

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

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

ISSN Vol.03, Issue.08, October-2015, Pages:

CSCI-UA.0201 Computer Systems Organization Memory Hierarchy

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

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

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

CS152 Computer Architecture and Engineering Lecture 19: I/O Systems

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

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

The CoreConnect Bus Architecture

CSE 380 Computer Operating Systems

COMP283-Lecture 3 Applied Database Management

Storage System COSC UCB

Computer Memory. Textbook: Chapter 1

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Computer System Architecture

Lecture 25: Interconnection Networks, Disks. Topics: flow control, router microarchitecture, RAID

SoC Design Lecture 11: SoC Bus Architectures. Shaahin Hessabi Department of Computer Engineering Sharif University of Technology

u Covered: l Management of CPU & concurrency l Management of main memory & virtual memory u Currently --- Management of I/O devices

COMPUTER ORGANIZATION AND DESIGN

SEMICON Solutions. Bus Structure. Created by: Duong Dang Date: 20 th Oct,2010

Buses. Disks PCI RDRAM RDRAM LAN. Some slides adapted from lecture by David Culler. Pentium 4 Processor. Memory Controller Hub.

Computer Architecture CS 355 Busses & I/O System

iimplementation of AMBA AHB protocol for high capacity memory management using VHDL

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

Buses. Maurizio Palesi. Maurizio Palesi 1

Keywords- AMBA, AHB, APB, AHB Master, SOC, Split transaction.

CISC 7310X. C11: Mass Storage. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/19/2018 CUNY Brooklyn College

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

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

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

Chapter 9: Peripheral Devices: Magnetic Disks

Mass-Storage Structure

CS 261 Fall Mike Lam, Professor. Memory

High-Performance Storage Systems

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

Chapter 10: Mass-Storage Systems

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

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

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Secondary storage. File systems

Lecture: Storage, GPUs. Topics: disks, RAID, reliability, GPUs (Appendix D, Ch 4)

Input/Output. Chapter 5: I/O Systems. How fast is I/O hardware? Device controllers. Memory-mapped I/O. How is memory-mapped I/O done?

Introduction to I/O. April 30, Howard Huang 1

Mass-Storage Structure

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

Transcription:

Department of Electr rical Eng ineering, Chapter 6 Storage and Other I/O Topics 王振傑 (Chen-Chieh Wang) ccwang@mail.ee.ncku.edu.tw ncku edu Feng-Chia Unive ersity Outline 6.1 Introduction 6.2 Dependability, Reliability, and Availability 6.3 Disk Storage 6.4 Flash Storage 6.5 Connecting Processors, Memory, and I/O Devices 6.6 Interfacing I/O Devices to the Processor, Memory, and Operating System 6.9 Parallelism and I/O: RAID 2

Introduction I/O Design affected by many factors (expandability, resilience) Performance : access latency throughput connection between devices and the system the memory hierarchy the operating system A variety of different users (e.g., banks, supercomputers, engineers) Processor Cache Main memory Interrupts I/O controller Disk Memory I/O bus Disk I/O controller Graphics output I/O controller Network 3 Depar rtment of Electr rical Engineering, Feng-Chia Unive ersity I/O Devices Very diverse devices behavior ( i.e., input vs. output t ) partner ( who is at the other end? ) data rate 4

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 CPU time improves by 50% per year for the next five years but I/O time doesn t improve, how much faster will our program run at the end of five years? The improvement in elapsed time is only 4.58 The I/O time has increased form 10% to 45% of the elapsed time. 5 Feng-Chia Unive ersity Outline 6.1 Introduction 6.2 Dependability, Reliability, and Availability 6.3 Disk Storage 6.4 Flash Storage 6.5 Connecting Processors, Memory, and I/O Devices 6.6 Interfacing I/O Devices to the Processor, Memory, and Operating System 6.9 Parallelism and I/O: RAID 6

Fault Cause and Result A representation of a defect. A fault may create a latent error which may become effective when it is activated, and the result is a failure.. Error A wrong output produced by a defective system. The cause of an error is called a fault. Error may be propagated from one unit to another unit. Failure Failure occurs because of an error. 7 Metrics for Measurement Reliability A measure of continuous service (of the time to failure) Mean time to failure (MTTF) Failure rate = 1/MTTF Overall failure rate = Sum of failure rates of the modules. Availability Module availability = MTTF/(MTTF + MTTR) MTTR: mean time to repair Dependability Quality of delivered service Fault-tolerance Using time or space redundancy to provide service in spite of the occurrences of fault 8

Feng-Chia Unive ersity Outline 6.1 Introduction 6.2 Dependability, Reliability, and Availability 6.3 Disk Storage 6.4 Flash Storage 6.5 Connecting Processors, Memory, and I/O Devices 6.6 Interfacing I/O Devices to the Processor, Memory, and Operating System 6.9 Parallelism and I/O: RAID 9 Magnetic Disk Platters Tracks Sectors Cylinder Disk access time Seek time Rotational delay (Rotational latency) Transfer time Controller time Magnetic Disks Platter Track Platters Tracks Sectors 10

Disk Read Time What is the average time to read or write a 512-byte sector for a typical disk rotating at 5400RPM? The advertised average seek time is 12ms, the transfer rate is 5MB/sec, and the controller overhead is 2ms. Assume that the disk is idle so that there is no waiting time. Average disk access time = (average seek time) + (average rotational delay) + (transfer time) + (controller overhead) 0.5R 512Byte 12 ms 2 ms 5400RPM 5MBps 12ms 5.56ms 0.1ms 2ms 19.66ms 11 Feng-Chia Unive ersity Outline 6.1 Introduction 6.2 Dependability, Reliability, and Availability 6.3 Disk Storage 64 6.4 Flash Storage 6.5 Connecting Processors, Memory, and I/O Devices 6.6 Interfacing I/O Devices to the Processor, Memory, and Operating System 6.9 Parallelism and I/O: RAID 12

Feng-Chia Unive ersity Flash Storage Nonvolatile semiconductor storage 100 1000 faster than disk Smaller, lower power, more robust But more $/GB (between disk and DRAM) 13 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 a time access Cheaper per GB Used for USB keys, media storage, Flash bits wears out after 10,000 s of accesses Not suitable for direct RAM or disk replacement Wear leveling: remap data to less used blocks 14

Feng-Chia Unive ersity Outline 6.1 Introduction 6.2 Dependability, Reliability, and Availability 6.3 Disk Storage 6.4 Flash Storage 6.5 Connecting Processors, Memory, and I/O Devices 6.6 Interfacing I/O Devices to the Processor, Memory, and Operating System 6.9 Parallelism and I/O: RAID 15 Depar rtment of Electrical Engineering, Feng-Chia Unive ersity Desktop PC Source : http://en.wikipedia.org/wiki/front_side_bus 16

Buses Shared communication link (one or more wires) Difficult design: may be bottleneck length of the bus number of devices tradeoffs (buffers for higher bandwidth increases latency) support for many different devices cost Types of buses: processor-memory (short high speed, custom design) backplane (high h speed, often standardized, di d e.g., PCI) I/O (lengthy, different devices, e.g., USB, Firewire) Synchronous vs. Asynchronous use a clock and a synchronous protocol, fast and small but every device must operate at same rate and clock skew requires the bus to be short don t use a clock and instead use handshaking 17 Depar rtment of Electrical Engineering, Feng-Chia Unive ersity PCI Express System Source : PCI Express Base Specification Revision 1.0a 18

I/O Bus Examples Firewire USB 2.0 PCI Express Serial ATA Serial Attached SCSI Intended use External External Internal Internal External Devices per 63 127 1 1 4 channel 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/lan e 1, 2, 4, 8, 16, 32 300MB/s Yes Yes Depends Yes Yes 300MB/s Max length 4.5m 5m 0.5m 1m 8m Standard IEEE 1394 USB Implementers PCI-SIG SATA-IO INCITS TC T10 Forum 19 System on a Chip (SoC) Processing Elements Microcontroller, Microprocessor, DSP Memory Elements ROM, RAM, Flash I/O & Peripherals Timer, Watchdog, UART, I 2 C, GPIO Interconnection AMBA, CoreConnect, NoC 20

Depar rtment of Electrical Engineering, Feng-Chia Unive ersity TI OMAP 1510 Platform Architecture Source : http://www.ti.com 21 Depar rtment of Electrical Engineering, Feng-Chia Unive ersity ITRI PAC Platform Architecture Source : http://int.stc.itri.org.tw 22

AMBA (1/3) The Advanced Microcontroller Bus Architecture (AMBA) was introduced in 1996 and is widely used as the on-chip bus for ARM processors. AMBA is designed for use in System-on-a-chip (SoC) designs. The important aspect of a SoC is not only which components or blocks it houses, but also how they are interconnected. AMBA is a solution for the blocks to interface with each other. 23 AMBA (2/3) Four buses/interfaces defined: ASB ( Advanced System Bus ) APB ( Advanced Peripheral Bus ) AHB ( Advanced High-performance Bus ) AXI ( Advanced extensible Interface ) The objective of the AMBA specification: be technology independent, enhance design reusability using IP cores, encourage modular system design to improve processor independence, minimize the silicon infrastructure required. 24

Feng-Chia Unive ersity AMBA (3/3) The first AMBA buses were ASB and APB. In its 2nd version, ARM introduced AHB that is a single clock-edge protocol. This protocol is today a de-facto standard for 32-bit embedded processors because it is well documented and can be used without royalties. In 2003, ARM introduced the 3rd generation of AMBA including AXI high-performance interconnect. 25 Depar rtment of Electrical Engineering, Feng-Chia Unive ersity AMBA 2.0 26

Depar rtment of Electrical Engineering, AXI Features : AMBA3 AXI separate address/control and data phases support for unaligned data transfers using byte strobes separate read and write data channels to enable low-cost DMA ability to issue multiple outstanding addresses out-of-order transaction completion 27 Depar rtment of Electrical Engineering, Advanced High-performance Bus (AHB) AHB Features Multiple master ( up to 16 masters ) Burst transfers Split transactions Single cycle bus master handover Single clock edge operation Non-tristate implementation Wider data bus configurations. 28

Depar rtment of Electrical Engineering, Feng-Chia Unive ersity Advanced High-performance Bus (AHB) Source : AMBA Specification (Rev 2.0), 1999. http://www.arm.com 29 AMBA AHB-based system CPU Core IntMem (64KB SRAM) MuxM2S MuxS2M CPU Master AHB Slave Wrapper Wrapper Default Slave APBif External Memory Controller Arbiter Reset controller Decoder AHB Master Wrapper IP AHB Slave Wrapper 30

ReadReq 1 Data Ack DataRdy Handshaking protocol 2 2 3 4 4 5 6 7 ReadReq Memory Data Ack I/O Device 1. When memory sees the ReadReq line, it reads the address from the Data bus and raises Ack to indicate it has been seen. 2. I/O device sees the Ack line high and releases the ReadReq and Data lines. 3. Memory sees that ReadReq is low and drops the Ack line to acknowledge the ReadReq signal. 4. This step starts when the memory has the data ready. It places the data from the read request on the Data lines and raises DataRdy. 5. The I/O device sees DataRdy, reads the data from the bus, and signals that it has the data by raising Ack. 6. The memory sees the Ack signal, drops DataRdy, and releases the data lines. 7. Finally, the I/O device, seeing DataRdy go low, drops the Ack line, which indicates that the transmission is completed. DataRdy 31 Department of Electrical Engineering, Feng-Chia Unive ersity 32

Feng-Chia Unive ersity Outline 6.1 Introduction 6.2 Dependability, Reliability, and Availability 6.3 Disk Storage 6.4 Flash Storage 6.5 Connecting Processors, Memory, and I/O Devices 6.6 Interfacing I/O Devices to the Processor, Memory, and Operating System 6.9 Parallelism and I/O: RAID 33 I/O Interface Giving commands to I/O devices Memory-mapped I/O (MMIO) Special I/O instructions Communicating with the processor Polling Interrupt-driven I/O Transferring the data between a device and memory CPU Direct Memory Access (DMA) 34

Depar rtment of Electrical Engineering, Feng-Chia Unive ersity System on a Chip (SoC) 35 Feng-Chia Unive ersity Outline 6.1 Introduction 6.2 Dependability, Reliability, and Availability 6.3 Disk Storage 6.4 Flash Storage 6.5 Connecting Processors, Memory, and I/O Devices 6.6 Interfacing I/O Devices to the Processor, Memory, and Operating System 6.9 Parallelism and I/O: RAID 36

RAID Redundant Arrays of Inexpensive Disks (RAID) RAID 0 : No Redundancy RAID 1 : Mirroring RAID 2 : Error Detecting and Correcting Code RAID 3 : Bit-Interleaved Parity RAID 4 : Block-Interleaved Parity RAID 5 : Distributed Block-Interleaved Parity References : http://en.wikipedia.org/wiki/raid http://www.acnc.com/04_00.html com/04 00 html 37 RAID 0 : No Redundancy Striping RAID 1 : Mirroring ( shadowing ) RAID 0 & RAID 1 Striping Strip 0 Strip 1 Strip 2 Strip 3 Strip 4 Strip 5 Strip 6 Strip 7 Strip 8 Strip 9 Strip 10 Strip 11 Strip 12 Strip 13 Strip 14 Strip 15 38

Depar rtment of Electr rical Engineering, RAID 01 (mirrored stripes) RAID 10 (striped mirrors) RAID 0 + RAID 1 Striping Mirroring Mirroring Mirroring Mirroring Strip 0 Strip 0 Strip 1 Strip 1 Strip 2 Strip 2 Strip 3 Strip 3 Strip 4 Strip 4 Strip 5 Strip 5 Strip 6 Strip 6 Strip 7 Strip 7 Strip 8 Strip 8 Strip 9 Strip 9 Strip 10 Strip 10 Strip 11 Strip 11 Strip 12 Strip 12 Strip 13 Strip 13 Strip 14 Strip 14 Strip 15 Strip 15 39 RAID 2 & RAID 3 RAID 2 : ECC ( ex: Hamming Code ) b 0 b 1 b 2 b 3 F 0(b) F 1(b) F 2(b) RAID 3 : Bit-Interleaved Parity 40

RAID 3 D0 (i) D0(i) P (i) = D0 (i) D1(i) D2(i) D3(i) P (i) P(i) (N-1) Reads, 2 Writes RAID 4 / RAID 5 Update a Disk D0 (i) D0(i) P (i) = D0 (i) D1(i) D2(i) D3(i) = D0 (i) D1(i) D2(i) D3(i) 0 = D0 (i) D1(i) D2(i) D3(i) D0(i) D0(i) = D0 (i) P(i) D0(i) P (i) P(i) 2R Reads, 2W Writes 41 RAID 4 & RAID 5 RAID 4 : Block-Interleaved Parity Block 0 Block 1 Block 2 Block 3 P(0-3) Block 4 Block 5 Block 6 Block 7 P(4-7) Block 8 Block 9 Block 10 Block 11 P(8-11) Block 12 Block 13 Block 14 Block 15 P(12-15) Block 16 Block 17 Block 18 Block 19 P(16-19) RAID 5 : Distributed Block-Interleaved Parity Block 0 Block 1 Block 2 Block 3 P(0-3) Block 4 Block 5 Block 6 P(4-7) Block 7 Block 8 Block 9 P(8-11) Block 10 Block 11 Block 12 P(12-15) Block 13 Block 14 Block 15 P(16-19) 19) Block 16 Block 17 Block 18 Block 19 42

RAID 6: P + Q Redundancy N + 2 disks Like RAID 5, but two lots of parity Greater fault tolerance through more redundancy Multiple RAID More advanced systems give similar fault tolerance with better performance 43 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 http://www.pcguide.com/ref/hdd/perf/index.htm 44