CPS104 Computer Organization and Programming Lecture 18: Input-Output. Robert Wagner



Similar documents
Communicating with devices

Input / Ouput devices. I/O Chapter 8. Goals & Constraints. Measures of Performance. Anatomy of a Disk Drive. Introduction - 8.1

What is a bus? A Bus is: Advantages of Buses. Disadvantage of Buses. Master versus Slave. The General Organization of a Bus

Writing Assignment #2 due Today (5:00pm) - Post on your CSC101 webpage - Ask if you have questions! Lab #2 Today. Quiz #1 Tomorrow (Lectures 1-7)

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

Price/performance Modern Memory Hierarchy

Devices and Device Controllers

RAID. RAID 0 No redundancy ( AID?) Just stripe data over multiple disks But it does improve performance. Chapter 6 Storage and Other I/O Topics 29

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

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

CS 6290 I/O and Storage. Milos Prvulovic

Big Picture. IC220 Set #11: Storage and I/O I/O. Outline. Important but neglected

Chapter 1 Computer System Overview

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

Outline. CS 245: Database System Principles. Notes 02: Hardware. Hardware DBMS Data Storage

Computer Organization & Architecture Lecture #19

Sistemas Operativos: Input/Output Disks

Computer Systems Structure Input/Output

Mass Storage Structure

William Stallings Computer Organization and Architecture 7 th Edition. Chapter 6 External Memory

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Data Storage - I: Memory Hierarchies & Disks

VDI Solutions - Advantages of Virtual Desktop Infrastructure

Input/output (I/O) I/O devices. Performance aspects. CS/COE1541: Intro. to Computer Architecture. Input/output subsystem.

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Chapter 11 I/O Management and Disk Scheduling

Primary Memory. Input Units CPU (Central Processing Unit)

1 Storage Devices Summary

Q & A From Hitachi Data Systems WebTech Presentation:

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Overview and History of Operating Systems

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

Platter. Track. Index Mark. Disk Storage. PHY 406F - Microprocessor Interfacing Techniques

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

Chapter 10: Mass-Storage Systems

Introduction to I/O and Disk Management

Chapter 9: Peripheral Devices: Magnetic Disks

Windows Server Performance Monitoring

Computer Architecture Prof. Mainak Chaudhuri Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

INPUT/OUTPUT ORGANIZATION

Solid State Drive Architecture

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

COMPUTER SCIENCE AND ENGINEERING - Microprocessor Systems - Mitchell Aaron Thornton

Outline. Principles of Database Management Systems. Memory Hierarchy: Capacities and access times. CPU vs. Disk Speed

Disk Storage & Dependability

Chapter 8 Memory Units

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

Computer Peripherals

The Art of Workload Selection

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Lecture 9: Memory and Storage Technologies

DELL SOLID STATE DISK (SSD) DRIVES

Tech Application Chapter 3 STUDY GUIDE

Chapter 11 I/O Management and Disk Scheduling

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

Here are my slides from lecture, along with my notes about each slide.

Disks and RAID. Profs. Bracy and Van Renesse. based on slides by Prof. Sirer

William Stallings Computer Organization and Architecture 8 th Edition. External Memory

Computer Systems Structure Main Memory Organization

Main Memory & Backing Store. Main memory backing storage devices

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Have both hardware and software. Want to hide the details from the programmer (user).

Obj: Sec 1.0, to describe the relationship between hardware and software HW: Read p.2 9. Do Now: Name 3 parts of the computer.

1 File Management. 1.1 Naming. COMP 242 Class Notes Section 6: File Management

Lizy Kurian John Electrical and Computer Engineering Department, The University of Texas as Austin

lesson 1 An Overview of the Computer System

Chapter 3: Computer Hardware Components: CPU, Memory, and I/O

1. Computer System Structure and Components

File System Management

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

Types Of Storage Device

Performance Beyond PCI Express: Moving Storage to The Memory Bus A Technical Whitepaper

Chapter 5 Busses, Ports and Connecting Peripherals

Random-Access Memory (RAM) The Memory Hierarchy. SRAM vs DRAM Summary. Conventional DRAM Organization. Page 1

Memory Hierarchy. Arquitectura de Computadoras. Centro de Investigación n y de Estudios Avanzados del IPN. adiaz@cinvestav.mx. MemoryHierarchy- 1

Fusionstor NAS Enterprise Server and Microsoft Windows Storage Server 2003 competitive performance comparison

Indexing on Solid State Drives based on Flash Memory

COMPUTER ARCHITECTURE. Input/Output

Operating System Software

WHITE PAPER Guide to 50% Faster VMs No Hardware Required

Chapter 7. Disk subsystem

Fall Lecture 1. Operating Systems: Configuration & Use CIS345. Introduction to Operating Systems. Mostafa Z. Ali. mzali@just.edu.

Record Storage and Primary File Organization

How To Improve Performance On A Single Chip Computer

Read this before starting!

System Architecture. CS143: Disks and Files. Magnetic disk vs SSD. Structure of a Platter CPU. Disk Controller...

I/O. Input/Output. Types of devices. Interface. Computer hardware

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

Optimizing SQL Server Storage Performance with the PowerEdge R720

Performance Characteristics of VMFS and RDM VMware ESX Server 3.0.1

K Hinds Page No. 1. Lecture 3 ASCII

Lecture 16: Storage Devices

Maximizing VMware ESX Performance Through Defragmentation of Guest Systems. Presented by

Accelerating Server Storage Performance on Lenovo ThinkServer

CSCA0201 FUNDAMENTALS OF COMPUTING. Chapter 5 Storage Devices

Storage and File Systems. Chester Rebeiro IIT Madras

Transcription:

CPS104 Computer Organization and Programming Lecture 18: Input-Output Robert Wagner cps 104 I/O.1 RW Fall 2000

Outline of Today s Lecture The I/O system Magnetic Disk Tape Buses DMA cps 104 I/O.2 RW Fall 2000

The Big Picture: Where are We Now? Today s Topic: I/O Systems Network Processor Control Memory Input Input Memory Processor Control Datapath Output Output Datapath cps 104 I/O.3 RW Fall 2000

Motivation: Who Cares About I/O? CPU Performance goes up : 50% - 80% per year I/O system performance limited by mechanical delays < 5% per year (IO per sec or MB per sec) Amdahl's Law: system speed-up limited by the slowest part! 10% IO & 10x CPU => 5x Performance (lose 50%) 10% IO & 100x CPU => 10x Performance (lose 90%) I/O bottleneck: Diminishing fraction of time in CPU Diminishing value of faster CPUs cps 104 I/O.4 RW Fall 2000

I/O System Design Issues Performance Expandability Resilience in the face of failure Processor interrupts Cache Memory - I/O Bus Main Memory I/O Controller I/O Controller I/O Controller Disk Disk Graphics Network cps 104 I/O.5 RW Fall 2000

I/O System Performance I/O System performance depends on many aspects of the system ( weakest link in the chain ): The CPU The memory system: Internal and external caches Main Memory The underlying interconnection (buses) The I/O controller The I/O device The speed of the I/O software (Operating System) The efficiency of the software s use of the I/O devices Two common performance metrics: Throughput: I/O bandwidth Response time: Latency cps 104 I/O.6 RW Fall 2000

Producer-Server Model Producer Queue Server Throughput: The number of tasks completed by the server in unit time In order to get the highest possible throughput: The server should never be idle The queue should never be empty Response time: Begins when a task is placed in the queue Ends when it is completed by the server In order to minimize the response time: The queue should be empty The server will be idle cps 104 I/O.7 RW Fall 2000

I/O Device Examples Device Behavior Partner Data Rate (KB/sec) Keyboard Input Human 0.01 Mouse Input Human 0.02 Line Printer Output Human 1.00 Laser Printer Output Human 100.00 Graphics Display Output Human 30,000.00 Network-LAN Input/Output Machine 10,000.00 Floppy disk Storage Machine 50.00 Optical Disk Storage Machine 500.00 Magnetic Disk Storage Machine 5,000.00 cps 104 I/O.8 RW Fall 2000

Technology Trends Disk Capacity doubles every 1.5 years Today: Processing Power Doubles Every 18 months Today: Memory Size Doubles Every 18 months(?) Today: Disk Capacity Doubles Every 12-18 months The I/O GAP Disk Positioning Rate (Seek + Rotate) Doubles Every Ten Years! cps 104 I/O.9 RW Fall 2000

Organization of a Hard Magnetic Disk Platters Track Typical numbers (depending on the disk size): 500 to 2,000 tracks per surface 32 to 128 sectors per track Sector A sector is the smallest unit that can be read or written Traditionally all tracks have the same number of sectors: Constant bit density: record more sectors on the outer tracks Recently relaxed: constant bit size, speed varies with track location cps 104 I/O.10 RW Fall 2000

Magnetic Disk Characteristic Track Sector Cylinder: all the tracks under the head at a given point on all surfaces Read/write data is a three-stage process: Seek time: position the arm over the proper track Rotational latency: wait for the desired sector to rotate under the read/write head Transfer time: transfer a block of bits (sector) under the read-write head Head Cylinder Platter Average seek time as reported by the industry: Typically in the range of 8 ms to 12 ms (Sum of the time for all possible seeks) / (total # of possible seeks) Due to locality of disk reference, observed average seek time may: Only be 25% to 33% of the advertised number cps 104 I/O.11 RW Fall 2000

Typical Numbers of a Magnetic Disk Track Sector Rotational Latency: Most disks rotate at 3,600 or 7200 RPM Approximately 16 ms to 8 ms per revolution, respectively An average latency to the desired information is halfway around the disk: 8 ms at 3600 RPM, 4 ms at 7200 RPM Head Cylinder Platter Transfer Time is a function of : Transfer size (usually a sector): 1 KB / sector Rotation speed: 3600 RPM to 7200 RPM Recording density: bits per inch on a track Diameter typical diameter ranges from 2.5 to 5.25 in Typical values: 2 to 12 MB per second cps 104 I/O.12 RW Fall 2000

Tape vs. Disk Longitudinal tape uses same technology as hard disk; tracks its density improvements Inherent cost/performance based on geometry: fixed rotating platters with gaps (random access, limited area, fixed media, re-write any block) vs. removable long strips wound on spool (sequential access, "unlimited" length, write only at end ) New technology trend: Helical Scan (VCR, Camcorder, DAT) Spins head at angle to tape to improve density cps 104 I/O.13 RW Fall 2000

Current Drawbacks to Tape Tape wear out: Helical 100s of passes to 1000s for longitudinal Head wear out: 2000 hours for helical Both must be accounted for in economic / reliability model Long rewind, eject, load, spin-up times; cps 104 I/O.14 RW Fall 2000

CDR vs. Tape CDR Helical Scan Tape Type 5.25" 8mm Capacity 0.75 GB 5-12 GB Media Cost $3 $8 Drive Cost $200 $600 Access Write Once Read/Write Robot Time 10-20 s 10-20 s Media cost ratio CDR vs. helical tape = 2.7 : 1 cps 104 I/O.15 RW Fall 2000

Buses: Connecting I/O to Processor and Memory Processor Control Memory Input Datapath Output A bus is a shared communication link It uses one set of wires to connect multiple subsystems cps 104 I/O.16 RW Fall 2000

Output Operation Output is defined as the Processor sending data to the I/O device: Step 1: Request Memory Processor Control (Memory Read Request) Data (Memory Address) Memory I/O Device (Disk) Step 2: Read Memory Processor Control Data Memory I/O Device (Disk) Step 3: Send Data to I/O Device Control (Device Write Request) Processor I/O Device (Disk) Data (I/O Device Address and then Data) Memory cps 104 I/O.17 RW Fall 2000

Input Operation Input is defined as the Processor receiving data from the I/O device: Step 1: Request Memory Processor Control (Memory Write Request) Data (Memory Address) Memory I/O Device (Disk) Step 2: Receive Data Control (I/O Read Request) Processor I/O Device (Disk) Data (I/O Device Address and then Data) Memory cps 104 I/O.18 RW Fall 2000

Types of Buses Processor-Memory Bus (design specific) Short and high speed Only need to match the memory system Maximize memory-to-processor bandwidth Connects directly to the processor I/O Bus (industry standard) Usually is lengthy and slower Need to match a wide range of I/O devices Connects to the processor-memory bus or backplane bus Backplane Bus (industry standard) Backplane: an interconnection structure within the chassis Allow processors, memory, and I/O devices to coexist Cost advantage: one single bus for all components cps 104 I/O.19 RW Fall 2000

A Computer System with One Bus: Backplane Bus Processor Backplane Bus Memory I/O Devices A single bus (the backplane bus) is used for: Processor to memory communication Communication between I/O devices and memory Advantages: Simple and low cost Disadvantages: slow and the bus can become a major bottleneck Example: IBM PC cps 104 I/O.20 RW Fall 2000

A Two-Bus System Processor Processor Memory Bus Memory Bus Adaptor I/O Bus Bus Adaptor I/O Bus Bus Adaptor I/O Bus I/O buses tap into the processor-memory bus via bus adaptors: Processor-memory bus: mainly for processor-memory traffic I/O buses: provide expansion slots for I/O devices Example: Apple Macintosh-II NuBus: Processor, memory, and a few selected I/O devices SCCI Bus: the rest of the I/O devices cps 104 I/O.21 RW Fall 2000

OS and I/O Systems Communication Requirements The Operating System must be able to prevent: The user program from communicating with the I/O device directly If user programs could perform I/O directly: Protection to the shared I/O resources could not be provided User could change the OS copy on disk Data privacy could not be maintained Three types of communication are required: The OS must be able to give commands to the I/O devices The I/O device must be able to notify the OS when the I/O device has completed an operation or has encountered an error Data must be transferred between memory and an I/O device cps 104 I/O.22 RW Fall 2000

OS to I/O Interface I/O device control registers are addressable as memory locations OS initiates operation of I/O device X by storing into X s control register X s control register might be location 0x100 in memory Each device uses different memory location(s) Device indicates operation complete (and reports errors) by setting code in another control register, also addressed as memory location OS can poll devices -- examine control registers of each, in turn Devices can interrupt processor to signal need for attention Each device, or possibly type of device, can use a different interrupt location, or cause code This approach avoids special I/O op-codes Protection of I/O devices handled by memory protection system OS prevents user program from read/write access to I/O locations cps 104 I/O.23 RW Fall 2000

I/O Interrupt An I/O interrupt is just like any exception except: An I/O interrupt is asynchronous Information about the interrupt needs to be conveyed to OS An I/O interrupt is asynchronous with respect to instruction execution: I/O interrupt is not associated with any instruction I/O interrupt does not prevent any instruction from completion Hardware designer can pick any convenient point to take an interrupt I/O interrupt is more complicated than exception: Needs to convey the identity of the device generating the interrupt Interrupt requests can have different urgencies: Interrupt request needs to be prioritized cps 104 I/O.26 RW Fall 2000

Delegating I/O Responsibility from the CPU: DMA CPU sends a starting address, direction, and length count to DMAC. Then issues "start". Direct Memory Access (DMA): External to the CPU Act as a master on the bus Transfers blocks of data to or from memory without CPU intervention CPU Memory DMAC IOC device DMAC provides handshake signals for Peripheral Controller, and Memory Addresses and handshake signals for Memory. cps 104 I/O.27 RW Fall 2000

Summary: I/O performance is weakest link in chain between OS and device Disk I/O Benchmarks: I/O rate vs. Data rate vs. latency Three Components of Disk Access Time: Seek Time: advertised to be 8 to 12 ms. May be lower in real life. Rotational Latency: 4.1 ms at 7200 RPM and 8.3 ms at 3600 RPM Transfer Time: 2 to 12 MB per second Three types of buses: Processor-memory, I/O, Backplane performance vs. cost I/O device notifying the operating system: Polling: it can waste a lot of processor time I/O interrupt: similar to exception except it is asynchronous Delegating I/O responsibility from the CPU: DMA, or even IOP cps 104 I/O.28 RW Fall 2000