1 / 11

UQC113S2

Explore the hardware support and higher levels of software required for interrupt-driven IO. Learn about strategies for IO handling, device drivers, error handling, buffering strategies, and the functional layers of IO systems.

follis
Download Presentation

UQC113S2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UQC113S2 Interrupt driven IO

  2. Interrupt driven IO • We have already seen the hardware support required to facilitate interrupts • We will now look at the higher levels of software required to support interrupt driven IO • Much of what we will be looking at is really operating system material

  3. Strategies for I/O handling • Can be programmed or polled io • Is wasteful of cpu resources • Can be interrupt driven • Is difficult for some devices • Can use DMA • Is a mixture of polled and interrupt • Can be slow

  4. Layers of Software for IO

  5. Device Drivers • We have already looked at the interrupt routines • All the other hardware specific code is placed in the device driver • These are normally either block or character orientated devices • Can be generic for specific devices • ie all SCSI devices, disks, cd-roms.

  6. Device Drivers • Device Driver should offer • Uniform interface, all should be able to be read, written, opened and closed • Buffering capacity – this will vary per device • Error handling and reporting – should be graceful • Often should be hot swappable

  7. Error Handling & Reporting • Errors are much more common with IO than with anything else (except users!) • There can be: • programming errors • Asking a device to do something it can’t ie write to a mouse • Actual I/O errors • Hard disk sector corrupted, disk not in drive, etc

  8. Buffering Strategies

  9. Buffering Strategies • A unbuffered input • Inefficient, must re-start user process constantly • B Buffering in user space • Users may not have correct control over buffer • C Buffering in kernel + copy to user space • Efficient but what about overflow? • D Double buffering in the kernel • The best!

  10. I/O Functional layers

  11. The structure of I/O systems

More Related