Microsoft Store
 

Device driver


 

A device driver, often called a driver for short, is a computer program that enables another program, typically, an operating system (e.g., Windows, Linux, FreeBSD) to interact with a hardware device. A driver is essentially an instruction manual that provides the operating system with the information on how to control and communicate with a particular piece of hardware. In layman's terms, a driver is an important, vital piece to a program application; the main ingredients of the system.

Related Topics:
Computer program - Operating system - Windows - Linux - FreeBSD - Hardware device - Driver - Instruction manual - Layman's terms

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

A particular variant of device drivers are virtual device drivers. They are used in virtualization environments, for example when an MS-DOS program is run on a Microsoft Windows computer or when a guest operating system is run inside eg. VMware. Instead of enabling the host operating system to dialog with hardware, virtual device drivers take the opposite role and emulate a piece of hardware, so that the guest operating system and its drivers running inside a virtual machine can have the illusion of accessing real hardware. Attempts by the guest operating system to access the hardware are routed to the virtual device driver in the host operating system as eg. function calls. The virtual device driver can also send simulated processor-level events like interrupts into the virtual machine.

Related Topics:
MS-DOS - Microsoft Windows - Operating system - VMware - Virtual machine - Function call - Interrupt

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Because of the diversity of modern hardware and operating systems, many ways exist in which drivers can be used. Drivers are used for interfacing with:

Related Topics:
Hardware - Interfacing

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

  • Printers
  • Video adapters
  • Network cards
  • Sound cards
  • Local buses of various sorts - in particular, for bus mastering on modern systems
  • Low-bandwidth I/O buses of various sorts (for pointing devices such as mice, keyboards, USB, etc.)
  • computer storage device (hard disk, CD-ROM and floppy disk buses (ATA, SATA SCSI)
  • Implementing support for different file systems
  • Implementing support for image scanners and digital cameras
  • Common levels of abstraction for device drivers are:

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

  • On the hardware side:
  • Interfacing directly
  • Using some higher-level interface (e.g. Video BIOS)
  • Using another lower-level device driver (e.g. file system drivers using disk drivers)
  • Simulating work with hardware, while doing something entirely different
  • On the software side:
  • Allowing the operating system direct access to hardware resources
  • Implementing only primitives
  • Implementing an interface for non-driver software (e.g. TWAIN)
  • Implementing a language, sometimes quite high-level, e.g. PostScript
  • Writing a device driver is considered a challenge in most cases, as it requires an in-depth understanding of how a given platform functions, both at the hardware and the software level. In contrast to most types of user-level software running under modern operating systems, which can be stopped without greatly affecting the rest of the system, a bug in a device driver means in many cases that the whole system can stop functioning in a way which can severely damage the data or even the hardware of the computer system. Moreover, debugging device drivers is a difficult skill as it often involves monitoring hardware itself - which by definition behaves in a non-deterministic way.

    Related Topics:
    Platform - Computer system - Non-deterministic

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    All of this means that the people most likely to write device drivers come from the companies that develop the hardware - since they have more complete access to information about the design of their hardware than most outsiders. Moreover, it was traditionally considered in the hardware manufacturer's interest to guarantee that their clients would be able to use their hardware in an optimum way. However, in recent years non-vendors too have written numerous device drivers, mainly for use under free operating systems. In such cases, co-operation on behalf of the vendor is still important, however, as reverse engineering is much more difficult with hardware than it is with software, meaning it may take a long time to learn to operate hardware that has an unknown interface.

    Related Topics:
    Manufacturer - Free operating systems - Reverse engineering

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~