Device Drivers


Click here to change the theme.

A driver is software that interfaces between a limited resource and the operating system.

A limited resource is something such as a hardware device or memory; in other words, there is basically only one thing that is used by multiple applications. For example, two applications cannot use the same physical printer at the same time; typically, a printer device driver will spool print data to a temporary location (disk) and then another device driver, such as a parallel port driver, will send the data to the printer when it is available.

Since a driver is software that the operating system uses, the way it works is entirely dependent on the operating system.

Another very useful feature of device drivers is that they provide device independence for applications. In more primitive operating systems, such as DOS, applications must have a variety of code for a variety of printers. When a DOS program needs to print something, it must know what the printer is and it must create the printer control codes to send to the printer. In a more sophisticated operating system, such as Windows, applications do not need to know what printer control characters to use; there is a Windows function to do most everything and the Windows printer device driver for that printer knows what control codes to send. Another example of device independence is display adapters; a DOS program must have various programming that depends on the type of display adapter, but a Windows program just uses GDI functions and the display adapter driver has code that implements the GDI functions.