G disk character eg terminal others eg clock ints io

Info icon This 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern