7.1. Device Drivers

7.1.1. The Device Driver Interface

../_images/driverAPI.png

7.1.2. Device Driver Layers

../_images/driver_layers.png

7.1.3. System Call Interface

  • Functions available to application programs

  • Abstract all devices (and files) to a few interfaces

  • Make interfaces as similar as possible

    • Block vs character

    • Sequential vs direct access

  • Device driver implements functions (one entry point per API function)

7.1.4. Example - UNIX Driver

open

Prepare dev for operation

close

No longer using the device

ioctl

Character dev specific info

read

Character dev input op

write

Character dev output op

strategy

Block dev input/output ops

select

Character dev check for data

stop

Discontinue a stream output op