Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 UQC113S2 Interrupt driven IO

2 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 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


Download ppt "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."

Similar presentations


Ads by Google