UQC113S2 - PowerPoint PPT Presentation

About This Presentation
Title:

UQC113S2

Description:

We will now look at the higher levels of software required ... A unbuffered input. Inefficient, must re-start user process constantly. B Buffering in user space ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 12
Provided by: craig60
Category:

less

Transcript and Presenter's Notes

Title: UQC113S2


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 cant 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
Write a Comment
User Comments (0)
About PowerShow.com