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

Similar documents
Lecture 13. Storage, Network and Other Peripherals

Chapter 6 Storage and Other I/O Topics

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.

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

Storage. Hwansoo Han

Computer Science 146. Computer Architecture

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 I/O 1. I/O devices can be characterized by Behavior: input, output, storage Partner: human or machine Data rate: bytes/sec, transfers/sec

Storage Systems. Storage Systems

EE108B Lecture 17 I/O Buses and Interfacing to CPU. Christos Kozyrakis Stanford University

Input/Output Problems. External Devices. Input/Output Module. I/O Steps. I/O Module Function Computer Architecture

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

Computer Architecture CS 355 Busses & I/O System

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

Thomas Polzer Institut für Technische Informatik

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

Introduction to Input and Output

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

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

Chapter 6. Storage and Other I/O Topics

Chapter 6. Storage and Other I/O Topics

Chapter 6. I/O issues

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

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

Virtual Memory Input/Output. Admin

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

Chapter 6. Storage and Other I/O Topics

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

I/O CANNOT BE IGNORED

Organisasi Sistem Komputer

Computer Systems Laboratory Sungkyunkwan University

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

Generic Model of I/O Module Interface to CPU and Memory Interface to one or more peripherals

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

Chapter Seven Morgan Kaufmann Publishers

CS 341l Fall 2008 Test #4 NAME: Key

Input/Output Introduction

Introduction. Motivation Performance metrics Processor interface issues Buses

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

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

Example Networks on chip Freescale: MPC Telematics chip

INPUT/OUTPUT ORGANIZATION

Bus System. Bus Lines. Bus Systems. Chapter 8. Common connection between the CPU, the memory, and the peripheral devices.

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

INPUT/OUTPUT ORGANIZATION

Introduction to the PCI Interface. Meeta Srivastav

CS152 Computer Architecture and Engineering Lecture 20: Busses and OS s Responsibilities. Recap: IO Benchmarks and I/O Devices

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

ECE 485/585 Microprocessor System Design

ECE 250 / CPS 250 Computer Architecture. Input/Output

Chapter 3. Top Level View of Computer Function and Interconnection. Yonsei University

PCI and PCI Express Bus Architecture

Lecture #9-10: Communication Methods


ECE331: Hardware Organization and Design

CMSC 313 Lecture 26 DigSim Assignment 3 Cache Memory Virtual Memory + Cache Memory I/O Architecture

Introduction Electrical Considerations Data Transfer Synchronization Bus Arbitration VME Bus Local Buses PCI Bus PCI Bus Variants Serial Buses

Computer Organization ECE514. Chapter 5 Input/Output (9hrs)

Lecture 23. Finish-up buses Storage

Lecture 25: Busses. A Typical Computer Organization

Computer System Overview

Babbage Analytical Machine

Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION

I/O CANNOT BE IGNORED

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

Module 6: INPUT - OUTPUT (I/O)

Chapter 6. Storage and Other I/O Topics

Storage System COSC UCB

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

Course Code CW-4-G Subject CHM (17428) Subject Teacher Mr. Pise S. P. Topic-1- Motherboard & It s Components

COSC121: Computer Systems. Exceptions and Interrupts

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Replacement Policy: Which block to replace from the set?

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

Interconnecting Components

Operating Systems 2010/2011

Read this before starting!

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

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

Lecture 23: I/O Redundant Arrays of Inexpensive Disks Professor Randy H. Katz Computer Science 252 Spring 1996

I/O Systems. EECC551 - Shaaban. Processor. Cache. Memory - I/O Bus. Main Memory. I/O Controller. I/O Controller. I/O Controller. Graphics.

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

Digital Design Laboratory Lecture 6 I/O

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

INPUT/OUTPUT ORGANIZATION

CSC Operating Systems Spring Lecture - XIX Storage and I/O - II. Tevfik Koşar. Louisiana State University.

RAID Structure. RAID Levels. RAID (cont) RAID (0 + 1) and (1 + 0) Tevfik Koşar. Hierarchical Storage Management (HSM)

Computer Architecture

The RM9150 and the Fast Device Bus High Speed Interconnect

The control of I/O devices is a major concern for OS designers

Chapter 1: Motherboard & Its Components

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 6. Storage & Other I/O

ECE468 Computer Organization and Architecture. OS s Responsibilities

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

1 PC Hardware Basics Microprocessors (A) PC Hardware Basics Fal 2004 Hadassah College Dr. Martin Land

ECE232: Hardware Organization and Design

Computer Organization and Microprocessors SYLLABUS CHAPTER - 1 : BASIC STRUCTURE OF COMPUTERS CHAPTER - 3 : THE MEMORY SYSTEM

Storage Systems. The text highlighted in green in these slides contain external hyperlinks. 1 / 12

System Buses Ch 3. Computer Function Interconnection Structures Bus Interconnection PCI Bus. 9/4/2002 Copyright Teemu Kerola 2002

Transcription:

IO System Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay http://www.ee.iitb.ac.in/~viren/ E-mail: viren@ee.iitb.ac.in CP-226: Computer Architecture Lecture 25 (24 April 2013)

Typical Collection of I/O Devices Processor interrupts Figure 6.1 Cache Memory I/O bus Main Memory I/O Controller I/O Controller I/O Controller Disk Disk Graphics Output Network Computer Architecture@MNIT 2

Types of Storage Type Size Speed Cost/bit Register < 1KB < 1ns $$$$ On-chip SRAM 8KB-6MB < 10ns $$$ Off-chip SRAM 1Mb 16Mb < 20ns $$ DRAM 64MB 1TB < 100ns $ Flash 64MB 32GB < 100us ~c Disk 40GB 1PB < 20ms ~0 Computer Architecture@MNIT 3

RAID: Redundant Array of Inexpensive Disks Dependability Reliability: Measured by MTTF (mean Bme to failure) Service interrupbon: measured by MTTR (mean Bme to repair) Availability = MTTF/(MTTF + MTTR) What if we need 100 disks for storage? MTTF = 5 years / 100 = 18 days! RAID 0 Data striped (spread over mulbple disks), but no error protecbon RAID 1 Mirror = stored twice = 100% overhead (most expensive) RAID 5 Block- wise parity = small overhead and small writes Computer 4

RAID 0: Block-level stripping Computer 5

RAID 1: Mirroring Computer 6

RAID 2: Bit-level Interleave with ECC Computer Architecture@MNIT 7

RAID 3: Byte-level Interleave Computer Architecture@MNIT 8

RAID 4: Block-level Interleave Computer Architecture@MNIT 9

RAID 5: Block-level interleaved distributed parity Computer Architecture@MNIT 10

RAID Illustrations Raid 0 Stripping Check disks Raid 1 Mirroring Raid 2 Bit ECC Raid 3 Byte interleaved Raid 4 Block interleaved Raid 5 distributed Block interleaved Raid 6 Computer Architecture@MNIT 11

Helical scan Tape 8mm video tape + ECC 7GB/tape at $6/tape = <$1/GB Note similar to cheap IDE hard drives! Tape robots E.g. Library of Congress is 10TB text 1500 tapes x $6 = $9000 Of course, not that simple Computer Architecture@MNIT 12

Original Ethernet LAN = Ethernet One- write bus with collisions and exponenbal back- off Within building 10Mb/s (~= 1MB/s) Now Ethernet is Point to point clients (switched network) Client s/w, protocol unchanged 100Mb/s => 1Gb/s Computer 13

LAN Ethernet not technically opbmal 80x86 is not technically opbmal either! Nevertheless, many efforts to displace it have failed (token ring, ATM) Emerging: System Area Network (SAN) Reduce SW stack (TCP/IP processing) Reduce HW stack (interface on memory bus) Standard: Infiniband (hjp:// www.infinibandta.org) Computer Architecture@MNIT 14

Bus A shared communicabon link between processor and memory, and I/O devices ConsisBng of control lines and data lines Control: determine which device gets to access the bus, what type of informabon on data lines Data: address, command, data to and from devices FuncBon: Access control, arbitrabon: right to use bus Ensure safe transacbon in asynchronous transfer using hand- shaking protocol, and/or ECC Computer Architecture@MNIT 15

Buses Bunch of wires ArbitraBon Control/command Data Address Flexible, low cost Can be bandwidth bojleneck Types Processor- memory Short, fast, custom I/O Long, slow, standard Backplane Medium, medium, standard Computer Architecture@MNIT 16

Processor Backplane bus Memory a. I/O devices Buses in a Processor Processor-memory bus Memory Computer Bus adapter Bus adapter Bus adapter System I/O bus I/O bus I/O bus b. Processor Processor-memory bus Memory Backplane bus Bus adapter Bus adapter I/O bus Bus adapter I/O bus c. Computer Architecture@MNIT 17

Buses Synchronous has clock Everyone watches clock and latches at appropriate phase TransacBons take fixed or variable number of clocks Faster but clock limits length E.g. processor- memory Asynchronous requires handshake More flexible I/O Handshaking protocol: A series of steps used to coordinate asynchronous bus transfers in which the sender and receiver proceed to the next step only when both parbes agree that the current step has been completed. Computer Architecture@MNIT 18

Async. Handshake (Fig. 8.10) Orange: I/O device, Black: Memory ReadReq 1 Data address 2 2 3 4 data 6 Ack DataRdy 4 5 7 (1) Request made by I/O device & (2) ack send by Memory (3) Request deasserted & (4) ack deasserted Wait Bll memory has data ready, it raise data ready and place data on data bus (5) Data sent & (6) Data rec d by I/O device and raise ack line & (7) ack deasserted and data off line by memory Computer Architecture@MNIT 19

Improving bandwidth Buses Wider bus Separate/mulBplexed address/data lines Block transfer SpaBal locality Computer Architecture@MNIT 20

Bus Arbitration Resolving bus control conflicts and assigning prioribes to the requests for control of the bus. One or more bus masters, others slaves Bus request Bus grant Priority Fairness ImplementaBons Centralized (Arbiter, can be part of CPU or separate device) Distributed (e.g. Ethernet) Computer Architecture@MNIT 21

Bus Mastering Allows bus to communicate directly with other devices on the bus without going through CPU Devices capable to take control of the bus. Frees up the processor (to do other work simultaneously) Computer Architecture@MNIT 22 Hill, Lipasti 22

Buses Bus architecture / standards ISA (Industry Standard Architecture) MCA (Micro Channel Architecture) EISA (Extended Industry Standard Architecture) VLB (Vesa Local Bus) PCI (Peripheral CommunicaBons Interconnect) PCI 32 or 64 bit Synchronous 33MHz or 66MHz clock MulBple masters 111 MB/s peak bandwidth Computer Architecture@MNIT 23

Example: The Pentium 4 s Buses Memory Controller Hub ( Northbridge ) Graphics output: 2.0 GB/s Gbit ethernet: 0.266 GB/s System Bus ( Front Side Bus ): 64b x 800 MHz (6.4GB/s), 533 MHz, or 400 MHz DDR SDRAM Main Memory 2 serial ATAs: 150 MB/s Hub Bus: 8b x 266 MHz PCI: 32b x 33 MHz 2 parallel ATA: 100 MB/s 8 USBs: 60 MB/s I/O Controller Hub ( Southbridge ) Fig 8.11 Computer Architecture@MNIT 24

Interfacing Three key characterisbcs MulBple users share I/O resource Overhead of managing I/O can be high Low- level details of I/O devices are complex Three key funcbons Virtualize resources protecbon, scheduling Use interrupts (similar to excepbons) Device drivers Computer Architecture@MNIT 25

Interfacing to I/O Devices I/O Device Communication Control Flow Granularity Fine-grained (shallow adapters) Coarse-grained (deep adapters, e.g. channels) Mechanics of Control Flow Mechanics of Data Flow Outbound Control Flow Inbound Control Flow Programmed I/O Direct Memory Access (DMA) Programmed I/O Memory-mapped Control Registers Polling Interrupt-driven Software Cache Coherence Hardware Cache Coherence Computer Architecture@MNIT 26

Interfacing How do you give I/O device a command? Memory- mapped load/store Special addresses not for memory Send commands as data Cacheable? I/O commands Special opcodes Send over I/O bus Computer Architecture@MNIT 27

Interfacing How do I/O devices communicate w/ CPU? Poll on devices Waste CPU cycles Poll only when device acbve? Interrupts Similar to excepbons, but asynchronous Info in cause register Possibly vectored interrupt handler Computer Architecture@MNIT 28

Transfer data Interfacing Polling and interrupts by CPU OS transfers data Too many interrupts? Use DMA so interrupt only when done Use I/O channel extra smart DMA engine Offload I/O funcbons from CPU Computer Architecture@MNIT 29

Input/Output Proc Cache Proc Cache PCI Bridge Graphics Memory SCSI Computer Architecture@MNIT 30

DMA CPU sets up Interfacing Device ID, operabon, memory address, # of bytes DMA Performs actual transfer (arb, buffers, etc.) Interrupt CPU when done Typically I/O bus with devices use DMA E.g. hard drive, NIC Computer Architecture@MNIT 31

Interfacing DMA virtual or physical addresses? Cross page boundaries within DMA? Virtual Page table entries, provided by OS Physical One page per transfer OS chains the physical addresses No page faults in between lock pages Computer Architecture@MNIT 32

Thank You Computer Architecture@MNIT 33