COMP3891

IO Management

IO Devices

There exists a large variety of IO devices:

Challenge:

Device Drivers

Role and Requirements of a Driver

Driver Categories

Driver To Kernel Interface

Major issue is uniform interfaces to devices and kernel:

Acessing IO Controllers

IO Interaction

Programmed IO

Pros:

Cons:

Interrupt Driven IO

Pros:

Cons:

IO Using Direct Memory Accesss

Pros:

Cons:

Interrupt Handlers

Top Half / Bottom Half

Interrupt handlers are split in two:

Buffering

Buffering improves performance as processes don’t need to read/write a device a byte/word at a time.

User Level Buffering

Process specifies a memory buffer that incoming data is placed in until it fills.

Problems:

Single Kernel Buffer

OS assigns a buffer in kernel’s memory for an IO request.

Stream-oriented scenario:

Block-oriented scenario:

Speed up:

Problems:

Double Kernel Buffer

OS uses two kernel buffers instead of one.

Speed up:

Advantages:

Disadvantages:

Circular Buffer

OS uses more than two buffers.