Input/Output Systems

Similar documents
Chapter 13: I/O Systems

Chapter 13: I/O Systems. Chapter 13: I/O Systems. Objectives. I/O Hardware. A Typical PC Bus Structure. Device I/O Port Locations on PCs (partial)

Module 12: I/O Systems

Chapter 13: I/O Systems

Module 12: I/O Systems

I/O Systems. 04/16/2007 CSCI 315 Operating Systems Design 1

Device-Functionality Progression

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

Chapter 13: I/O Systems

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS

Lecture 13 Input/Output (I/O) Systems (chapter 13)

Chapter 12: I/O Systems

Chapter 13: I/O Systems

Chapter 12: I/O Systems. Operating System Concepts Essentials 8 th Edition

I/O AND DEVICE HANDLING Operating Systems Design Euiseong Seo

Chapter 13: I/O Systems

Chapter 13: I/O Systems

Chapter 13: I/O Systems

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

CSE 4/521 Introduction to Operating Systems. Lecture 24 I/O Systems (Overview, Application I/O Interface, Kernel I/O Subsystem) Summer 2018

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

Silberschatz and Galvin Chapter 12

Chapter 13: I/O Systems

Lecture 15: I/O Devices & Drivers

Module 11: I/O Systems

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

Chapter 13: I/O Systems

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

COT 4600 Operating Systems Fall Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

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

NWI-IBC019: Operating systems

Operating Systems 2010/2011

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

Comp 204: Computer Systems and Their Implementation. Lecture 18: Devices

Devices. Today. Comp 104: Operating Systems Concepts. Operating System An Abstract View 05/01/2017. Devices. Devices

CS370 Operating Systems

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

I/O Systems. Jo, Heeseung

CS370 Operating Systems

Input/Output Systems

[08] IO SUBSYSTEM 1. 1

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

CHAPTER 12 AND 13 - MASS-STORAGE STRUCTURE & I/O- SYSTEMS

I/O SYSTEMS. Sunu Wibirama

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.

I/O. CS 416: Operating Systems Design Department of Computer Science Rutgers University

VIII. Input/Output Operating Systems Prof. Dr. Marc H. Scholl DBIS U KN Summer Term

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

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

Principles of Operating Systems CS 446/646

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

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)

UNIT-7. Overview of Mass Storage Structure

Chapter 7: Mass-storage structure & I/O systems. Operating System Concepts 8 th Edition,

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

Outline. Operating Systems: Devices and I/O p. 1/18

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

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

Organisasi Sistem Komputer

CSCI-GA Operating Systems I/O. Hubertus Franke

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

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

Operating Systems. Lecture 09: Input/Output Management. Elvis C. Foster

Operating Systems. Steven Hand. Michaelmas / Lent Term 2008/ lectures for CST IA. Handout 4. Operating Systems

or edit a file, our immediate interest is to read or enter some information, not to compute an answer.

Input / Output. School of Computer Science G51CSA

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

CS162 Operating Systems and Systems Programming Lecture 16. I/O Systems. Page 1

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

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

CS162 Operating Systems and Systems Programming Lecture 16. Page Allocation and Replacement (con t) I/O Systems

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

OPERATING SYSTEMS CS136

Operating Systems. V. Input / Output

Answer to exercises chap 13.2

Digital Design Laboratory Lecture 6 I/O

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

CS420: Operating Systems. Kernel I/O Subsystem

I/O and Device Drivers

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


Chapter 5 Input/Output. I/O Devices

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)

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

Lecture 1 Introduction (Chapter 1 of Textbook)

Module 2: Computer-System Structures. Computer-System Architecture

Input Output (IO) Management

CS370 Operating Systems

Slide 5-1. Device. Management. Operating Systems: A Modern Perspective, Chapter 5. Copyright 2004 Pearson Education, Inc.

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)

Chapter 1: Introduction. Operating System Concepts 8 th Edition,

Mobile Operating Systems Lesson 01 Operating System

Processes and More. CSCI 315 Operating Systems Design Department of Computer Science

C02: Interrupts and I/O

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

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall

I/O Systems and Storage Devices

Transcription:

Input/Output Systems CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition of the course text Operating Systems Concepts, 8th ed., by Silberschatz, Galvin, and Gagne. Many, if not all, the illustrations contained in this presentation come from this source.

I/O Hardware Incredible variety of I/O devices. Common concepts: Port, Bus (daisy chain or shared direct access), Controller (host adapter). I/O instructions control devices. Devices have addresses, used by Direct I/O instructions, Memory-mapped I/O. CSCI 315 Operating Systems Design 2

Concepts port: a connection point between a peripheral device and the computer. serial parallel USB Firewire system A B C bus: a set of wires shared by one or more devices, which communicate with the system using a rigid protocol. D E F G daisy chain: every device has two ports; either one port connects directly to the system and the other to another device, or the two ports connect to other devices. The chain usually operates as a bus. CSCI 315 Operating Systems Design 3

A Typical PC Bus Structure CSCI 315 Operating Systems Design 4

CPU and I/O Controllers The processor transfers data to and from an I/O controller to effect I/O operations on devices. CPU CPU control I/O controller A B C D register register I/O controller r w id CSCI 315 Operating Systems Design 5

Memory-Mapped I/O The processor reads and writes data to address in its memory space, which are associated with the registers and control lines of I/O controllers. I/O port CPU memory bus 0x000 0x004 0x008 0x00C status control data in data out RAM CSCI 315 Operating Systems Design 6

Device I/O Port Locations on PCs (partial) CSCI 315 Operating Systems Design 7

Polling Determines state of device: command-ready, busy, error. Busy-wait cycle to wait for I/O from device: the CPU is involved in periodically checking the status of the operation. CSCI 315 Operating Systems Design 8

Interrupts CPU Interrupt request line triggered by I/O device. Interrupt handler receives interrupts. Maskable to ignore or delay some interrupts. Interrupt vector used to dispatch interrupt to correct handler: Based on priority. Some unmaskable. Interrupt mechanism also used for exceptions. CSCI 315 Operating Systems Design 9

Interrupt-Driven I/O Cycle CSCI 315 Operating Systems Design 10

Intel Pentium Processor Event-Vector Table CSCI 315 Operating Systems Design 11

Direct Memory Access (DMA) Used to avoid programmed I/O for large data movement. Requires DMA controller. The controller allows for data to be transferred directly between I/O device and memory without CPU intervention. CSCI 315 Operating Systems Design 12

DMA Transfer CSCI 315 Operating Systems Design 13

Application I/O Interface I/O system calls encapsulate device behaviors in generic classes. Device-driver layer hides differences among I/O controllers from kernel. Devices vary in many dimensions: Character-stream or block. Sequential or random-access. Sharable or dedicated. Speed of operation. Read-write, read only, or write only. CSCI 315 Operating Systems Design 14

A Kernel I/O Structure CSCI 315 Operating Systems Design 15

Characteristics of I/O Devices CSCI 315 Operating Systems Design 16

Block and Character Devices Block devices include disk drives. Commands include read, write, seek. Raw I/O or file-system access. Memory-mapped file access possible. Character devices include keyboards, mice, serial ports. Commands include get, put. Libraries layered on top allow line editing. CSCI 315 Operating Systems Design 17

Network Devices Different enough from block and character to have their own interface. Unix and Windows NT/9x/2000 include socket interface: Separates network protocol from network operation. Includes select functionality. Approaches vary widely (pipes, FIFOs, streams, queues, mailboxes). CSCI 315 Operating Systems Design 18

Clocks and Timers Provide current time, elapsed time, timer. If programmable interval time used for timings, periodic interrupts. ioctl (on UNIX) covers odd aspects of I/ O such as clocks and timers. CSCI 315 Operating Systems Design 19

Blocking and Nonblocking I/O Blocking - process suspended until I/O completed. Easy to use and understand. Insufficient for some needs. Nonblocking - I/O call returns as much as available. User interface, data copy (buffered I/O). Implemented via multi-threading. Returns quickly with count of bytes read or written. Asynchronous - process runs while I/O executes. Difficult to use. I/O subsystem signals process when I/O completed. CSCI 315 Operating Systems Design 20