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

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

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

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.

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

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

Lecture 13. Storage, Network and Other Peripherals

Chapter 6. I/O issues

Introduction to Input and Output

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

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

Storage System COSC UCB

I/O CANNOT BE IGNORED

ECE468 Computer Organization and Architecture. OS s Responsibilities

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

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

ECE232: Hardware Organization and Design

I/O CANNOT BE IGNORED

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

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

Chapter Seven Morgan Kaufmann Publishers

Computer Architecture I/O Systems cs 152 L19.io.1

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

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

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

Storage Systems. Storage Systems

Systems Architecture II

CMSC 611: Advanced Computer Architecture

UNIT 2 Data Center Environment

Module 1: Basics and Background Lecture 4: Memory and Disk Accesses. The Lecture Contains: Memory organisation. Memory hierarchy. Disks.

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

CSE 153 Design of Operating Systems Fall 2018

Input/Output Introduction

Introduction. Motivation Performance metrics Processor interface issues Buses

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

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

Lectures More I/O

Virtual Memory Input/Output. Admin

Lecture 23. Finish-up buses Storage

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

Input Output (IO) Management

Storage. Hwansoo Han

Announcement. Computer Architecture (CSC-3501) Lecture 23 (17 April 2008) Chapter 7 Objectives. 7.1 Introduction. 7.2 I/O and Performance

Storage, Networks, and Other Peripherals

Storage Technologies and the Memory Hierarchy

Chapter 6. Storage & Other I/O

CS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems

CSE 153 Design of Operating Systems

Appendix D: Storage Systems

Chapter 6 Storage and Other I/O Topics

Recap: Making address translation practical: TLB. CS152 Computer Architecture and Engineering Lecture 24. Busses (continued) Queueing Theory Disk IO

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

Ref: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1

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

Session: Hardware Topic: Disks. Daniel Chang. COP 3502 Introduction to Computer Science. Lecture. Copyright August 2004, Daniel Chang

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

CSE 451: Operating Systems Spring Module 12 Secondary Storage

High-Performance Storage Systems

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

Computer System Architecture

Module 6: INPUT - OUTPUT (I/O)

CS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems

Chapter 11. I/O Management and Disk Scheduling

Chapter 6. Storage and Other I/O Topics

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

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013

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

CSE 451: Operating Systems Spring Module 12 Secondary Storage. Steve Gribble

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

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

CPS104 Computer Organization and Programming Lecture 17: Interrupts and Exceptions. Interrupts Exceptions and Traps. Visualizing an Interrupt

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

Today: Secondary Storage! Typical Disk Parameters!

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

Computer Systems Laboratory Sungkyunkwan University

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Storage. CS 3410 Computer System Organization & Programming

CS61C - Machine Structures. Week 7 - Disks. October 10, 2003 John Wawrzynek

Operating Systems. V. Input / Output

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

INPUT/OUTPUT ORGANIZATION

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

CS 201 The Memory Hierarchy. Gerson Robboy Portland State University

Mass-Storage Structure

Thomas Polzer Institut für Technische Informatik

Where Have We Been? Ch. 6 Memory Technology

INPUT-OUTPUT ORGANIZATION

CIS Operating Systems I/O Systems & Secondary Storage. Professor Qiang Zeng Fall 2017

Input/Output Management

COSC 243. Memory and Storage Systems. Lecture 10 Memory and Storage Systems. COSC 243 (Computer Architecture)

UNIT 4 Device Management

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002

6 Storage Systems. I/O certainly has been lagging in the last decade. Also, I/O needs a lot of work. Public Lecture (1976)

Lecture for Storage System

The Memory Hierarchy 10/25/16

CS429: Computer Organization and Architecture

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

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

Computer Architecture and System Software Lecture 09: Memory Hierarchy. Instructor: Rob Bergen Applied Computer Science University of Winnipeg

CS429: Computer Organization and Architecture

CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Transcription:

CPS104 Computer Organization and Programming Lecture 18: Input-Output Robert Wagner cps 104.1 RW Fall 2000 Outline of Today s Lecture The system Magnetic Disk Tape es DMA cps 104.2 RW Fall 2000 The Big Picture: Where are We Now? Today s Topic: Systems Network Control Input Input Control Datapath Output Output Datapath cps 104.3 RW Fall 2000 1

Motivation: Who Cares About? CPU Performance goes up : 50% - 80% per year 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%) bottleneck: Diminishing fraction of time in CPU Diminishing value of faster CPUs cps 104.4 RW Fall 2000 System Design Issues Performance Expandability Resilience in the face of failure interrupts Cache - Main Controller Controller Controller Disk Disk Graphics Network cps 104.5 RW Fall 2000 System Performance System performance depends on many aspects of the system ( weakest link in the chain ): The CPU The memory system: Internal and external caches Main The underlying interconnection (buses) The controller The device The speed of the software (Operating System) The efficiency of the software s use of the devices Two common performance metrics: Throughput: bandwidth Response time: Latency cps 104.6 RW Fall 2000 2

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.7 RW Fall 2000 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.8 RW Fall 2000 Technology Trends Disk Capacity doubles every 1.5 years Today: Processing Power Doubles Every 18 months Today: Size Doubles Every 18 months(?) Today: Disk Capacity Doubles Every 12-18 months The GAP Disk Positioning Rate (Seek + Rotate) Doubles Every Ten Years! cps 104.9 RW Fall 2000 3

Organization of a Hard Magnetic Disk Platters Track Typical numbers (depending on the disk size): Sector 500 to 2,000 tracks per surface 32 to 128 sectors per track 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.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.11 RW Fall 2000 Typical Numbers of a Magnetic Disk 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 Track Sector 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.12 RW Fall 2000 4

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.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.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.15 RW Fall 2000 5

es: Connecting to and Control Input Datapath Output A bus is a shared communication link It uses one set of wires to connect multiple subsystems cps 104.16 RW Fall 2000 Output Operation Output is defined as the sending data to the device: Step 1: Request Control ( Read Request) Data ( Address) Device (Disk) Step 2: Read Device (Disk) Control Data Step 3: Send Data to Device Device (Disk) Control (Device Write Request) Data ( Device Address and then Data) cps 104.17 RW Fall 2000 Input Operation Input is defined as the receiving data from the device: Step 1: Request Control ( Write Request) Data ( Address) Device (Disk) Step 2: Receive Data Device (Disk) Control ( Read Request) Data ( Device Address and then Data) cps 104.18 RW Fall 2000 6

Types of es - (design specific) Short and high speed Only need to match the memory system Maximize memory-to-processor bandwidth Connects directly to the processor (industry standard) Usually is lengthy and slower Need to match a wide range of devices Connects to the processor-memory bus or backplane bus Backplane (industry standard) Backplane: an interconnection structure within the chassis Allow processors, memory, and devices to coexist Cost advantage: one single bus for all components cps 104.19 RW Fall 2000 A Computer System with One : Backplane Backplane Devices A single bus (the backplane bus) is used for: to memory communication Communication between devices and memory Advantages: Simple and low cost Disadvantages: slow and the bus can become a major bottleneck Example: IBM PC cps 104.20 RW Fall 2000 A Two- System Adaptor Adaptor Adaptor buses tap into the processor-memory bus via bus adaptors: -memory bus: mainly for processor-memory traffic buses: provide expansion slots for devices Example: Apple Macintosh-II Nu:, memory, and a few selected devices SCCI : the rest of the devices cps 104.21 RW Fall 2000 7

OS and Systems Communication Requirements The Operating System must be able to prevent: The user program from communicating with the device directly If user programs could perform directly: Protection to the shared 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 devices The device must be able to notify the OS when the device has completed an operation or has encountered an error Data must be transferred between memory and an device cps 104.22 RW Fall 2000 OS to Interface device control registers are addressable as memory locations OS initiates operation of 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 op-codes Protection of devices handled by memory protection system OS prevents user program from read/write access to locations cps 104.23 RW Fall 2000 Interrupt An interrupt is just like any exception except: An interrupt is asynchronous Information about the interrupt needs to be conveyed to OS An interrupt is asynchronous with respect to instruction execution: interrupt is not associated with any instruction interrupt does not prevent any instruction from completion Hardware designer can pick any convenient point to take an interrupt 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.26 RW Fall 2000 8

Delegating Responsibility from the CPU: DMA CPU sends a starting address, direction, and length count to DMAC. Then issues "start". Direct 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 DMAC IOC device DMAC provides handshake signals for Peripheral Controller, and Addresses and handshake signals for. cps 104.27 RW Fall 2000 Summary: performance is weakest link in chain between OS and device Disk Benchmarks: 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: -memory,, Backplane performance vs. cost device notifying the operating system: Polling: it can waste a lot of processor time interrupt: similar to exception except it is asynchronous Delegating responsibility from the CPU: DMA, or even IOP cps 104.28 RW Fall 2000 9