Input/Output (I/O) Important OS function – control I/O

Slides:



Advertisements
Similar presentations
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
Advertisements

Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
Chapter 7 Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats.
1 Input/Output Chapter 3 TOPICS Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Reference: Operating Systems Design.
UQC113S2 Interrupt driven IO. We have already seen the hardware support required to facilitate interrupts We will now look at the higher levels of software.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Cpr E 308 Input/Output Recall: OS must abstract out all the details of specific I/O devices Today –Block and Character Devices –Hardware Issues – Programmed.
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent University.
I/O management is a major component of operating system design and operation Important aspect of computer operation I/O devices vary greatly Various methods.
Device Drivers CPU I/O Interface Device Driver DEVICECONTROL OPERATIONSDATA TRANSFER OPERATIONS Disk Seek to Sector, Track, Cyl. Seek Home Position.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output – 2 I/O Software CS 342 – Operating Systems Ibrahim Korpeoglu.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
OSes: 2. Structs 1 Operating Systems v Objective –to give a (selective) overview of computer system architectures Certificate Program in Software Development.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 I/O through system calls Protection.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
I/O Software CS 537 – Introduction to Operating Systems.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Part IVI/O Systems Chapter 13: I/O Systems. I/O Hardware a typical PCI bus structure 2.
CSCE451/851 Introduction to Operating Systems
Introduction to Operating Systems Concepts
I/O techniques - Interfacing
Chapter 13: I/O Systems.
Input/Output Device Drivers
Lecture 13 Input/Output (I/O) Systems (chapter 13)
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Input/Output.
Input/Output 1 1.
I/O system.
CS 286 Computer Organization and Architecture
CS703 - Advanced Operating Systems
Overview Peripheral Devices Input-Output Interface
Computer Architecture
Chapter 13: I/O Systems.
CSCI 315 Operating Systems Design
© CHAROTAR INSTITUTE OF TECHNOLOGY, CHANGA
CPSC 457 Operating Systems
Chapter 15, Exploring the Digital Domain
Computer-System Architecture
Module 2: Computer-System Structures
I/O Systems I/O Hardware Application I/O Interface
Operating Systems Chapter 5: Input/Output Management
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
Selecting a Disk-Scheduling Algorithm
CS703 - Advanced Operating Systems
Direct Memory Access Disk and Network transfers: awkward timing:
Chapter 5: I/O Systems.
Module 2: Computer-System Structures
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
UNIT-III Pin Diagram Of 8086
CS 143A Principles of Operating Systems
Chapter 13: I/O Systems.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Device Mgmt © 2004, D. J. Foreman.
Chapter 11 Processor Structure and function
Module 2: Computer-System Structures
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Module 2: Computer-System Structures
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Chapter 5 Input/Output Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Input/Output (I/O) Important OS function – control I/O Should present device independent interface. Interested in programming aspects, not how it works internally. Block devices – info is in fixed size blocks (i.e. 512 bytes to 32768 bytes) each block has an address. Blocks can be read and written independently. Disks are an example.

Input/Output (I/O) Character devices – works with streams of chars, not blocks. Solaris disk example: /dev/dsk/ disk devices are block while /dev/rdsk/ disk devices are character.

Input/Output (I/O) I/O controllers have some control registers the OS can write into. - to make a device perform some operation. - can also read to get status Many devices have a data buffer (i.e. Video RAM)

Input/Output (I/O) One way to write or read device port is to have instructions r/w a control register – separate I/O and memory Another way is to have memory-mapped I/O where the control registers are assigned an address space. Could also have a hybrid approach.

Direct Memory Access (DMA) Having the cpu request data from an I/O controller is a waste of its time. A DMA controller has access to the system bus independent of the cpu. Cycle stealing – DMA competes with cpu for bus and will delay the cpu.

I/O methods Programmed I/O – uses polling or “busy waiting”. Checks the status of device in a loop. Wastes the cpu. OK in an embedded system where the cpu has nothing else to do. Interrupt-driven I/O – Allow cpu to context switch to another job and receive an interrupt when I/O is done.

I/O methods I/O with DMA – cpu not involved DMA controller takes care of things allowing cpu to do other things The DMA controller can write directly to memory w/o the cpu.

More I/O Device drivers handle much of the I/O. Need a driver for each type of device. - present a device independent view. Modules can be loaded dynamically rather than compiled into kernel. Block and character devices major device number locates driver minor device number is parameter to driver for with unit. /dev files protected with permission bits.

Buffering More efficient to buffer data than to interrupt after each character. User buffers and kernel buffers. When kernel buffer fills copy to user buffer Double buffering – have two kernel buffers start filling second while copying full buffer to user space.