Next | Prev | Up | Top | Contents | Index

Levels of Device Drivers

There are two level of device drivers: user-level and kernel-level. For some devices, such as GIO bus cards, the device driver should be a kernel-level driver.[1] However, for devices that interface to a SCSI bus, EISA bus, or VME bus, it is possible to write a user-level device driver that controls the device by communicating directly to the bus.


User-level Device Drivers

Users cannot always treat the user-level device as just another file to be opened, read, written, and closed with the standard IRIX system commands. If you write a user-level driver, you may have to provide your users with device-specific routines or encapsulate the functionality in an application. This is normally the case with printers and scanners, for example.


Kernel-level Device Drivers

Deciding whether you can write a user-level driver is not difficult. It is also fairly easy to decide whether to write a VME bus, EISA-bus, or SCSI-bus user-level driver. However, if you decide to write your own kernel-level device driver, it is a little more difficult to decide what sort of kernel-level device driver to write. This guide provides you with the criteria you need to determine the appropriate driver model for a given device.

Note: Because IRIX kernels cannot, as a rule, be preempted, any driver that sits in a loop waiting for some condition to be satisfied may tie a processor up for as long as it wants. Real-time processes, such as audio, are very sensitive to such delays.


[1] Although it is possible to write a user-level GIO bus driver, it is discouraged because the user-level interfaces are not publicly available; in any case, most GIO bus boards are designed to take advantage of DMA, which requires a kernel-level driver.
Next | Prev | Up | Top | Contents | Index