Definition

What is a device driver?

A device driver, or driver, is a special kind of software program that controls a specific hardware device attached to a computer. Device drivers are essential for a computer to work properly. In addition, without a device driver, the respective hardware will fail to work accordingly.

Device drivers provide a software interface for attached hardware that enables the operating system (OS) and other applications to access that hardware's functionalities. There are device drivers for keyboards, mice and printers, for example.

These programs are compact, but they enable a computer to interact with hardware and work with networks, storage and graphics.

Device drivers are hardware dependent and specific to the OS. They communicate with computer hardware through a computer bus or a communications subsystem that's connected to the hardware.

How a device driver interacts with hardware and software.
A device driver enables an operating system or application to interact with a connected piece of hardware.

The terms hardware driver and software driver might also be used interchangeably with device driver. However, hardware and software driver are used to emphasize the type of connection.

How do device drivers work?

Device drivers generally run at a high level of privilege within the OS runtime environment. Some device drivers are linked directly to the OS kernel -- a core part of the OS that manages system resources and hardware. These device drivers enable more efficient communication and control over hardware devices.

A portion of an OS -- such as Windows, Linux or macOS -- remains memory resident. This means that a part of the OS stays loaded in the computer's RAM while the system is running and handles execution for all other code, including device drivers. Device drivers relay requests for device access and actions from the OS and its active applications to their respective hardware devices. They also deliver outputs or status messages from the hardware devices to the OS and, thus, to applications.

Most software programs don't need to know how to work directly with hardware because of the work device drivers do. Instead, the program and driver only need to know how to interface with each other.

Most of the time, drivers install automatically and don't require additional attention. However, some drivers require an occasional update.

Purpose of device drivers

Device drivers are necessary to enable a computer to interface and interact with specific devices. They define the messages and mechanisms whereby the computer -- the OS and applications -- can access the device or make requests for the device to fulfill. They also handle device responses and messages for delivery to the computer.

Device drivers essentially act as a translator for hardware devices and the OS and applications connected to it.

Types of device drivers

Invariably, hardware devices belong to a specific class, such as Bluetooth or 802.11xx wireless networking. Creating any specific device driver starts by working within its class framework. Within that class, a particular type of device -- such as Bluetooth audio, keyboards or mice -- also falls within a related driver framework.

Finally, for a specific individual device, within its class and type frameworks, its driver software interacts with that device using its native command set and data handling capabilities, as defined and published by its manufacturer. In addition, device drivers can access physical devices -- actual hardware -- or virtual devices that are emulations of hardware in a software program. The former are called physical drivers, and the latter are called virtual drivers.

There are several different possible types of device drivers, including the following:

  • BIOS. These drivers are responsible for booting the computer, performing startup tests and providing the drivers for basic hardware. BIOS device drivers are located in read-only memory.
  • Block drivers. These drivers offer structured access to hardware. They use file system buffers to reduce I/O operations.
  • Character drivers. These drivers provide unstructured access to the correlating hardware. Data is transferred to and from devices without the use of specific device addresses. They also provide interfaces for I/O control commands, memory mapping and device polling.
  • Kernel device drivers. These drivers are loaded with the OS for core hardware such as processors. They enable more efficient communication and control over hardware devices. They operate in layers, with higher-level drivers filtering data before passing it to lower-level ones.
  • Motherboard drivers. These drivers enable basic computer operations and peripheral connectivity in the OS. They're specific to chipset models and might need additional drivers for full functionality.
  • Open source drivers. These drivers are available for free under an open source license. They're often transparent, as the source code is open to anyone, making it possible to check for any malicious code.
  • Original equipment manufacturer drivers. OEM drivers are created by the original equipment manufacturers. They're proprietary drivers and installed separately to enable the functionality of additional hardware.
  • User-mode device drivers. These drivers run in user mode and manage external devices to which users might connect. In Windows, they interface between applications and kernel-mode drivers.
  • Virtual device drivers. These drivers control virtual machines. Virtual device drivers emulate the hardware of the host device.

Device driver examples

If an administrator runs the driverquery command in Microsoft Windows inside PowerShell or at the command line, it produces a list of all device drivers installed on the host computer. For Linux and macOS, running the lsmod command at a command prompt also lists device driver modules. It isn't unusual for a typical laptop or desktop PC to list hundreds of device drivers in response.

Examining this output provides useful driver information, including module name, driver type and display name used to identify a driver. The following is a brief sample from Windows 10.

Module Name  Display Name           Driver Type   Link Date           
============ ====================== ============= ====================
1394ohci     1394 OHCI Compliant Ho Kernel                            
3ware        3ware                  Kernel        5/18/2015 5:28:03 PM
ACPI         Microsoft ACPI Driver  Kernel                            
AcpiDev      ACPI Devices driver    Kernel                            

There are many different types of devices that can have their own respective drivers as well. Some examples of these more specific drivers include the following:

  • Bluetooth drivers.
  • Mouse drivers.
  • Digital camera drivers.
  • Graphics card drivers.
  • Keyboard drivers.
  • Motherboard drivers.
  • Network card drivers.
  • PC chipset drivers.
  • Printer drivers.
  • Sound card drivers.
  • Storage controller drivers.
  • USB device drivers.
  • Video card drivers.

Device driver software

In the early days of programming, device drivers were often written using assembly language, a low-level language that can access hardware and central processing unit instructions immediately and directly. Today, most programmers who write device drivers work either in the C or C++ programming languages because they offer excellent access to low-level instructions along with more complex program and data structures.

Testing device drivers must incorporate security as well as operational issues. Because such software runs at high levels of privilege, it could lead to system compromise or vulnerabilities on the security side, or outright failure due to crashing or freezing and performance problems on the operational side.

Without a properly working device driver, the corresponding hardware device connected to a computer won't work. Learn how to troubleshoot network issues in Windows 11 and the potential effects that device drivers have on them.

This was last updated in August 2024

Continue Reading About What is a device driver?

Dig Deeper on Application management

Virtual Desktop
SearchWindowsServer
Close