.. _drivers: Device Drivers ================ The Device Driver Interface ---------------------------- .. figure:: driverAPI.png :align: center Device Driver Layers ---------------------------- .. figure:: driver_layers.png :align: center 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) 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 =========== ==================================