6.1. Device Drivers

6.1.1. The Device Driver Interface


6.1.2. Device Driver Layers


6.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)

6.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