Skip to main content
Share Your Experience: Take the 2024 Developer Survey

A device driver is a specialized software component (usually considered "system software") which allows a system to interact with a particular type or class of hardware device, such as a keyboard, serial port, disk drive, video display, memory controller, or other peripheral.

A device driver performs translation between logical operations from the operating system or application and physical actions of a hardware device. If the hardware device supports interrupts, the device driver fields and processes its interrupts, possibly arranging for the requesting application to sleep as appropriate.

Device drivers developed since the 1980s are usually written in a high level language, most often C. They usually execute in the most trusted CPU context of the operating system (variously called "kernel mode", "ring 0", "executive mode", etc.) and so have significant restrictions on what actions they can perform. In particular, they usually lack access to a runtime library; often they cannot perform floating point operations within interrupt context.

A Virtual Device Driver is a special flavor where the driver emulates a hardware device, particularly in virtualization environments.