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

Similar documents
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.

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

Introduction to Input and Output

Storage Systems. Storage Systems

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

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

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

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

Lecture 13. Storage, Network and Other Peripherals

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

Computer Science 146. Computer Architecture

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

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

ECE232: Hardware Organization and Design

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

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

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

UNIT 2 Data Center Environment

I/O CANNOT BE IGNORED

Storage System COSC UCB

Computer Architecture CS 355 Busses & I/O System

Computer Organization

Chapter Seven Morgan Kaufmann Publishers

Chapter 6. I/O issues

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

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

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

CSE 153 Design of Operating Systems Fall 2018

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

1. What is the difference between primary storage and secondary storage?

Systems Architecture II

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

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

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

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

CSE 153 Design of Operating Systems

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

Virtual Memory Input/Output. Admin

Chapter 6 Storage and Other I/O Topics

Computer Systems Laboratory Sungkyunkwan University

ECE331: Hardware Organization and Design

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

I/O CANNOT BE IGNORED

INPUT-OUTPUT ORGANIZATION

Storage. Hwansoo Han

High-Performance Storage Systems

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

INPUT/OUTPUT ORGANIZATION

Chapter 11. I/O Management and Disk Scheduling

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.

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

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

Where Have We Been? Ch. 6 Memory Technology

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2017 Lecture 13

Module 6: INPUT - OUTPUT (I/O)

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

Computer System Architecture

Chapter 6. Storage & Other I/O

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

[537] I/O Devices/Disks. Tyler Harter

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

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?

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

Computer System Overview

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

Introduction To Computer Hardware. Hafijur Rahman

CS 201 The Memory Hierarchy. Gerson Robboy Portland State University

Chapter 6. Storage and Other I/O Topics

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

I/O and Device Drivers

Chapter 9: Peripheral Devices. By: Derek Hildreth Chad Davis

STORING DATA: DISK AND FILES

INPUT/OUTPUT ORGANIZATION

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

Architecture and OS. To do. q Architecture impact on OS q OS impact on architecture q Next time: OS components and structure

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

FUNCTIONS OF COMPONENTS OF A PERSONAL COMPUTER

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

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

Lectures More I/O

ECE468 Computer Organization and Architecture. OS s Responsibilities

Overview of Mass Storage Structure

Eastern Mediterranean University School of Computing and Technology INPUT / OUTPUT

8. Interfacing Processors and Peripherals

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

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

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

ECE331: Hardware Organization and Design

Storage Technologies and the Memory Hierarchy

STANDARD I/O INTERFACES

Hard Disk Drives (HDDs) Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

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 (IO) Management

Chapter 6. Storage and Other I/O Topics

Advanced Parallel Architecture Lesson 4 bis. Annalisa Massini /2015

Secondary Storage : Outline

The Memory Hierarchy 10/25/16

Hard Disk Drives (HDDs)

Transcription:

Reading and References Input / Output Reading» Section 8.1-8.5, Computer Organization and Design, Patterson and Hennessy CSE 410, Spring 2004 Computer Systems http://www.cs.washington.edu/education/courses/410/04sp/ 30-Apr-2004 cse410-15-input-output 2004 University of Washington 1 30-Apr-2004 cse410-15-input-output 2004 University of Washington 2 Why Input and Output? Everything we have done so far is based on moving data / instructions between main memory and the CPU How does the information get into main memory and out to the user?» during manufacture: burn it in» during operation: input / output hard disk A typical organization main memory I/O bus floppy disk processor/memory bus CDROM drive serial ports processor network interface 30-Apr-2004 cse410-15-input-output 2004 University of Washington 3 30-Apr-2004 cse410-15-input-output 2004 University of Washington 4

Behavior Types of I/O devices» input only (keyboard, mouse, sensor)» output only (monitor, LED display, actuator)» input and output (network, disk, tape, CD-RW) Partner» human or machine Data rate» negligible to KiloBytes/Second to MegaBytes/S Three Characteristic Devices Mouse» input only; human;.01-.02 KB/s Magnetic disks» input and output; machine; 100-10,000 KB/s Networks» input and output; machine; 500-6000 KB/s 30-Apr-2004 cse410-15-input-output 2004 University of Washington 5 30-Apr-2004 cse410-15-input-output 2004 University of Washington 6 Detecting Mouse Motion Mouse Interfaces Mechanical» Two perpendicular wheels on the inside connected to potentiometers Optical» LED and a photodetector on the bottom Optomechanical» The wheels have slots; an LED shines through them Lots of others» embedded microprocessor in the mouse Pointing device must provide» Status of each button» Position in X and Y Software must interpret the input» Double clicks» Limits to motion, speed Device driver Mouse interface Screen position position information position measurement 30-Apr-2004 cse410-15-input-output 2004 University of Washington 7 30-Apr-2004 cse410-15-input-output 2004 University of Washington 8

Anatomy of a Magnetic Disk read/write heads spindle arm tracks sectors platters cylinder: all tracks at the same radius, one/two per platter 30-Apr-2004 cse410-15-input-output 2004 University of Washington 9 Accessing Data from a Disk First, the disk arm moves over the right cylinder: seek time Next, wait for the data to rotate under the disk arm: rotational delay, (on average half the time for one revolution) Finally, read the data from the disk: transfer time At this point, the data is in the disk controller and can be transferred to memory 30-Apr-2004 cse410-15-input-output 2004 University of Washington 10 Disk Interface Only two data transfer operations on a disk:» read block, write block Hidden behind the interface:»block sector mappings Unknown to the disk: File system interface Disk interface Files Blocks» contents of the blocks/sectors Sectors 30-Apr-2004 cse410-15-input-output 2004 University of Washington 11 Disk Specifications Consider the disk in my (old) laptop» 5GB IBM DJSA-205 (from device manager) Specifications (from IBM data sheet)» rotation speed 4200 RPM rotational delay = 60 * 1/4200 * 0.5 = 7.1 ms» seek times avg: 12.0 ms, 1 track: 2.5 ms, full stroke: 23.0 ms» layout heads: 1, cylinders: 22784 (user), 10336 (actual) sectors per track: 293-560 30-Apr-2004 cse410-15-input-output 2004 University of Washington 12

Data buffer Data Transfer Specifications» 512 Kbytes on board the disk Media Transfer rate» 108.8 to 202.9 Mbits / sec Interface Transfer rate» Ultra-DMA mode 4: 66.6 Mbytes/sec» PIO mode 4: 16.6 Mbytes/sec Networks The device that lets a system connect to a network: network interface card Listens for data on the network important to this system Bundles the bits into packets and signals the OS when a packet is complete Also takes packets from OS and sends them as bits on the wire 30-Apr-2004 cse410-15-input-output 2004 University of Washington 13 30-Apr-2004 cse410-15-input-output 2004 University of Washington 14 Networking Interfaces OS puts extra packets in to define where stream begins and ends NIC puts extra bits in to define where packets begin and end Networking protocols NIC interface Streams Packets Bits YOU GET http://cnn.com/index.html From: YOU To: CNN GET http://cnn.com/index.html Network Example CNN STREAMS GET http://cnn.com/index.html From: YOU To: CNN PACKETS GET http://cnn.com/index.html BITS 1010111101010100110101010101010111 Internet 10101111010101001 30-Apr-2004 cse410-15-input-output 2004 University of Washington 15 30-Apr-2004 cse410-15-input-output 2004 University of Washington 16

YOU CNN A typical organization STREAMS main memory PACKETS Part 1 Part 2 Part 3 Part 4 Part 1 Part 2 Part 3 Part 4 processor/memory bus processor I/O bus BITS 1010111101010100110101010101010111 Internet hard disk CDROM serial drive ports network interface 10101111010101001 30-Apr-2004 Commands to I/O Devices 18 The device has some information for the processor. Two ways to convey it:» A special region of memory is set aside for a device» Loads and stores to addresses in this region are interpreted as commands to the device» Provides easy access control via the memory system» Issue an interrupt» Wait for the processor to ask for it - polling Which is better, interrupt-driven I/O or polling? Depends on:» time sensitivity of data» whether data is expected Special I/O instructions cse410-15-input-output 2004 University of Washington cse410-15-input-output 2004 University of Washington Device to Processor Memory-mapped I/O 30-Apr-2004 floppy disk 19 30-Apr-2004 cse410-15-input-output 2004 University of Washington 20

Device to Memory Direct Memory Access (DMA) allows devices and memory to communicate without involvement of processor Processor sets up the transaction Device and memory transfer the data Device interrupts processor to signal completion The processor gets a lot of other work done while transfer is happening Performance Issues in I/O Processors double in speed every 18 months Networks double in speed more slowly, perhaps every 3 years Disks improve more slowly, because they are limited by mechanical factors» however, bit density has gone up rapidly 30-Apr-2004 cse410-15-input-output 2004 University of Washington 21 30-Apr-2004 cse410-15-input-output 2004 University of Washington 22 The I/O Bottleneck System A» processor speed = 100 MHz (clock cycle 10 ns)» disk transfer takes 10 ms» How many clock cycles elapse while disk transfer takes place? System B» processor speed = 1 GHz (clock cycle 1 ns)» disk transfer still takes 10 ms» How many clock cycles now? 30-Apr-2004 cse410-15-input-output 2004 University of Washington 23 I/O Bus Constraints Two primary design points that must be met High speed» processor / memory, bulk devices / memory Flexibility» many types of I/O devices with widely varying characteristics» characteristics of future devices are unknown at design time 30-Apr-2004 cse410-15-input-output 2004 University of Washington 24

Designs The speed and flexibility constraints lead to designs which are» designed for speed processor-memory bus» designed for flexibility I/O bus» designed for both backplane bus Speed? Synchronous Bus For highest speed, all devices are designed to work together at the same high rate Synchronous buses have a clock signal that all devices on the bus are aware of Protocol for accessing the bus is relatively simple» control signals at specified clock cycles» data at specified clock cycles 30-Apr-2004 cse410-15-input-output 2004 University of Washington 25 30-Apr-2004 cse410-15-input-output 2004 University of Washington 26 Synchronous Issues Runs fast but» all attached devices must be designed for this particular (probably proprietary) bus» must be short so that signals can propagate across the whole bus» fast today is slow tomorrow Flexibility? Asynchronous Bus Devices access the bus by handshaking to determine who can go next No single clock» transactions are defined by control signal transitions Can accommodate a wide variety of device speeds and device types 30-Apr-2004 cse410-15-input-output 2004 University of Washington 27 30-Apr-2004 cse410-15-input-output 2004 University of Washington 28

Asynchronous Issues Flexible but» the handshake adds overhead to each transfer» special cases pollute the protocol as it is extended to provide higher speed capabilities» extreme network effect: once a bus is popular, it lives long past its expected lifetime because there are so many devices that use it Bus Bandwidth Width of the bus» number of data lines can be increased to transfer more bits of data in parallel Multiplexing» data signals and control signals can be put on the same lines at different times to save hardware» or separated to overlap handshake and data transfer Multi-word transfers» block transfers move more data per handshake 30-Apr-2004 cse410-15-input-output 2004 University of Washington 29 30-Apr-2004 cse410-15-input-output 2004 University of Washington 30 Controlling bus access With multiple devices on the bus, something must control access Bus Master» device that is allowed to initiate transfers Single bus master» simple, because no contention» potential bottleneck, because one device is busy for every single transfer on the bus Multiple Masters and Arbitration Let several devices act as bus masters Must decide who is in control for any particular transaction Arbitration» daisy chain - serial decision» centralized parallel - one decider» distributed parallel - many deciders» distributed with collision detection 30-Apr-2004 cse410-15-input-output 2004 University of Washington 31 30-Apr-2004 cse410-15-input-output 2004 University of Washington 32