I/O Management Intro. Chapter 5

Similar documents
I/O Devices. I/O Management Intro. Sample Data Rates. I/O Device Handling. Categories of I/O Devices (by usage)

I/O Management Intro. Chapter 5

Computer System Overview

Module 11: I/O Systems

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

I/O Systems. Jo, Heeseung

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

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

CSE 451: Operating Systems Winter I/O System. Gary Kimura

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

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

Today: I/O Systems. Architecture of I/O Systems

QUIZ Ch.6. The EAT for a two-level memory is given by:

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

I/O Management and Disk Scheduling. Chapter 11

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Computer Architecture CS 355 Busses & I/O System

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

Eastern Mediterranean University School of Computing and Technology INPUT / OUTPUT

Module 6: INPUT - OUTPUT (I/O)

Input/Output. 198:231 Introduction to Computer Organization Lecture 15. Instructor: Nicole Hynes

CSCI-GA Operating Systems I/O. Hubertus Franke

Input/Output Systems

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.

ECE331: Hardware Organization and Design

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)

Input / Output. School of Computer Science G51CSA

Computer Organization

[08] IO SUBSYSTEM 1. 1

Input-Output (I/O) Input - Output. I/O Devices. I/O Devices. I/O Devices. I/O Devices. operating system must control all I/O devices.

INPUT-OUTPUT ORGANIZATION

Organisasi Sistem Komputer

Chapter 13: I/O Systems

I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January WT 2008/09

操作系统概念 13. I/O Systems

Chapter 5 Input/Output. I/O Devices

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition

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

Today: Computer System Overview (Stallings, chapter ) Next: Operating System Overview (Stallings, chapter ,

Simplify System Complexity

Simplify System Complexity

Quiz 12.1: Paging. Goals for Today. Quiz 12.1: Paging. Page 1. CS162 Operating Systems and Systems Programming Lecture 12.

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

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

ECE232: Hardware Organization and Design

I/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14

Chapter Seven Morgan Kaufmann Publishers

Quiz 12.1: Paging" Quiz 12.1: Paging" Goals for Today" Page 1. CS162 Operating Systems and Systems Programming Lecture 12.

C02: Interrupts and I/O

CS 111. Operating Systems Peter Reiher


Storage. Hwansoo Han

I/O - input/output. system components: CPU, memory, and bus -- now add I/O controllers and peripheral devices. CPU Cache

LabSim Mapping Matrix

Computer Systems Laboratory Sungkyunkwan University

5.b Principles of I/O Hardware CPU-I/O communication

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

Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA) I/O Processors. 10/12/2017 Input/Output Systems and Peripheral Devices (02-2)

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

5 Computer Organization

TECHNOLOGY IN ACTION. Chapter 2. Alan Evans * Kendall Martin * Mary Anne Poatsy. Looking at Computers: Understanding the Parts

Chapter 13: I/O Systems

CS330: Operating System and Lab. (Spring 2006) I/O Systems

Input/Output Management

Device-Functionality Progression

Chapter 12: I/O Systems. I/O Hardware

I/O Management Software. Chapter 5

Operating System Design Issues. I/O Management

I/O Management Software. Chapter 5

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

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

CIS Operating Systems I/O Systems & Secondary Storage. Professor Qiang Zeng Spring 2018

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

Design Of Linux USB Device Driver For LPC2148 Based Data Acquisition System Including GSM.

Chapter 13: I/O Systems

Discussion Week 8. TA: Kyle Dewey. Tuesday, November 15, 11

UMBC. Rubini and Corbet, Linux Device Drivers, 2nd Edition, O Reilly. Systems Design and Programming

IT and Interface Requirements

I/O MANAGEMENT CATEGORIES OF I/O DEVICES 1. Slide 1. Slide 3. Controller: Three classes of devices (by usage):

CS252 Graduate Computer Architecture Spring 2014 Lecture 17: I/O

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

Module 1. Introduction. Version 2 EE IIT, Kharagpur 1

Computer Organization

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

Scuola Superiore Sant Anna. I/O subsystem. Giuseppe Lipari

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

Input / Output. Kevin Webb Swarthmore College April 12, 2018

Digital System Design

Agenda Computer Hardware Input Devices Output Devices Secondary Storage Computer Software System Software Application Software Working with Windows

Computer Science 146. Computer Architecture

10 Input and output in von Neumann s Computer selected themes

CDEs with Serverworks Chipset

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

Chapter 8: Input and Output. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V.

Chapter 13: I/O Systems

Summer 2003 Lecture 1 06/09/03

Chapter 5 - Input / Output

Operating Systems CMPSC 473. Input/Output April 22, Lecture 22 Instructor: Trent Jaeger

Transcription:

I/O Management Intro Chapter 5 1

Learning Outcomes A high-level understanding of the properties of a variety of I/O devices. An understanding of methods of interacting with I/O devices. An appreciation of the trend towards offloading more I/O handling to devices themselves. 2

I/O Devices There exists a large variety of I/O devices: Many of them with different properties They seem to require different interfaces to manipulate and manage them We don t want a new interface for every device Diverse, but similar interfaces leads to code duplication Challenge: Uniform and efficient approach to I/O 3

Categories of I/O Devices (by usage) Human interface Used to communicate with the user Printers, Video Display, Keyboard, Mouse Machine interface Used to communicate with electronic equipment Disk and tape drives, Sensors, Controllers, Actuators Communication Used to communicate with remote devices Ethernet, Modems, Wireless 4

Data rate I/O Device Handling May be differences of several orders of magnitude between the data transfer rates Example: Assume 1000 cycles/byte I/O Keyboard needs 10 KHz processor to keep up Gigabit Ethernet needs 100 GHz processor.. 5

6

Sample Data Rates USB 3.0 625 MB/s (5 Gb/s) Thunderbolt 2.5GB/sec (20 Gb/s) PCIe v3.0 x16 16GB/s 7

I/O Device Handling Considerations Complexity of control Unit of transfer Data may be transferred as a stream of bytes for a terminal or in larger blocks for a disk Data representation Encoding schemes Error conditions Devices respond to errors differently lp0: printer on fire! Expected error rate also differs 8

I/O Device Handling Considerations Layering Need to be both general and specific, e.g. Devices that are the same, but aren t the same Hard-disk, USB disk, RAM disk Interaction of layers Swap partition and data on same disk Two mice Priority Keyboard, disk, network 9

Accessing I/O Controllers a) Separate I/O and memory space I/O controller registers appear as I/O ports Accessed with special I/O instructions b) Memory-mapped I/O Controller registers appear as memory Use normal load/store instructions to access c) Hybrid x86 has both ports and memory mapped I/O Linux Device Drivers; Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman 10

Bus Architectures (a) A single-bus architecture (b) A dual-bus memory architecture 11

Intel IXP420 12

Interrupts Devices connected to an Interrupt Controller via lines on an I/O bus (e.g. PCI) Interrupt Controller signals interrupt to CPU and is eventually acknowledged. Exact details are architecture specific. 13

I/O Interation 14

Programmed I/O Also called polling, or busy waiting I/O module (controller) performs the action, not the processor Sets appropriate bits in the I/O status register No interrupts occur Processor checks status until operation is complete Wastes CPU cycles 15

Interrupt-Driven I/O Processor is interrupted when I/O module (controller) ready to exchange data Processor is free to do other work No needless waiting Consumes a lot of processor time because every word read or written passes through the processor 16

Direct Memory Access Transfers data directly between Memory and Device CPU not needed for copying CPU Memory Device 17

Direct Memory Access Transfers a block of data directly to or from memory An interrupt is sent when the task is complete The processor is only involved at the beginning and end of the transfer 18

DMA Considerations Reduces number of interrupts Less (expensive) context switches or kernel entry-exits Requires contiguous regions Copying Scatter-gather Synchronous/Asynchronous Shared bus must be arbitrated CPU cache reduces (but not eliminates) CPU need for bus CPU Memory Device 19

The Process to Perform DMA Transfer 20

Device Evolution - Complexity and Performance 21

Evolution of the I/O Function Processor directly controls a peripheral device Example: CPU controls a flip-flop to implement a serial line Bus CPU Memory Flip Flop Serial Line 22

Evolution of the I/O Function Controller or I/O module is added Processor uses programmed I/O without interrupts Processor does not need to handle details of external devices Example: A Universal Asynchronous Receiver Transmitter CPU simply reads and writes bytes to I/O controller I/O controller responsible for managing the signaling Bus CPU Memory UART Serial Line 23

Evolution of the I/O Function Controller or I/O module with interrupts Processor does not spend time waiting for an I/O operation to be performed Interrupt Line Bus CPU Memory UART Serial Line 24

Evolution of the I/O Function Direct Memory Access Interrupt Line Blocks of data are moved into memory without involving the processor Processor involved at beginning and end only Bus CPU Memory UART Serial Line 25

Evolution of the I/O Function I/O module has a separate processor Example: SCSI controller Controller CPU executes SCSI program code out of main memory Interrupt Line CPU CPU Memory SCSI Controller SCSI Bus Cable 26

Evolution of the I/O Function I/O processor I/O module has its own local memory, internal bus, etc. Its a computer in its own right Example: Myrinet 10 gigabit NIC Interrupt Line CPU RAM CPU Memory Myrinet Controller Bus 27