G disk character eg terminal others eg clock ints io

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: storage spooling power management Device Device Issues Introduction Introduction I/O Stack I/O Hardware Devices block – e.g. disk, character – e.g. terminal, others – e.g. clock (ints) I/O Software 3 OS layers 1 User layer I/O lib formatting ? I/O I/O Software Stack In Action Layers of the I/O system and the main functions of each layer Principles Principles of I/O Hardware Some typical device, network, and data rates Key feature? Not surprisingly – most of the OS code deals with I/O! Goals Goals of I/O Software Device independence Uniform naming – example? Error handling –why is this a challenge? Goals Goals of I/O Software Synchronous vs. asynchronous transfers • OS should mask asynchronous nature of devices if required Buffering • data coming off a device cannot always be stored in final destination • example? Device Device Controllers I/O devices have two components: • mechanical component • electronic component Electronic component - device controller • may be able to handle multiple devices Controller's tasks • convert serial bit stream to block of bytes (deal with I/O bit rate) • perform error correction • buffering Device Device Drivers Invoke command sequence needed to control device, e.g. write stuff into registers …block …block until interrupt occurs I/O can be initiated by special I/O instructions that read/write I/O “control registers” or I/O ports (serial, parallel, USB, CD, disk, …) • OUT IO_PORT, CPU_REG – writes contents of CPU_REG into IO_PORT Drivers are typically dynamically loaded into the OS Drivers must be reentrant – why? Today – hot-pluggable systems require more sophisticated drivers – why? DeviceDevice-Independent I/O Software What can be device independent? Discuss. DeviceDevice-Independent I/O Software: Standard Interface Interface (a) Without a standard driver interface (b) With a standard driver interface e.g. read/write block device: my_block_driver (dev#, I/O_type, …) 1. simplifies OS – all drivers support same interface 2. kernel routines that the drivers internally use can also be given standard interfaces...
View Full Document

This document was uploaded on 04/02/2014.

Ask a homework question - tutors are online