Device Driver
- In Turkish
- sürücü
In short
A device driver is software that lets the operating system control a specific piece of hardware, translating generic OS requests into device-specific commands.
What is a device driver?
Every hardware device, from a graphics card or network card to an SSD, printer, or keyboard, has its own low-level way of being controlled. A device driver is the software that knows those details and hides them behind a standard interface, so the operating system and applications can simply read a file, send a packet, or draw a window without knowing which exact model is installed.
Most drivers run inside the kernel, often as loadable kernel modules that can be added without rebooting. A driver registers with a kernel subsystem, such as storage, networking, or input, then talks to the hardware through special memory addresses and device registers, moves data efficiently with direct memory access (DMA), and handles the device's interrupts. On Unix-like systems many devices appear as files under /dev. Because kernel drivers have full privileges, a single driver bug can crash the whole computer, which is why operating systems require signed drivers and move some drivers out to user space.
A driver works like a travel interpreter: the operating system speaks one common language, each device speaks its own dialect, and the driver translates in both directions. Shared hardware standards such as USB HID for keyboards and mice or NVMe for SSDs let one generic driver handle devices from many manufacturers, which is why a new keyboard usually works the moment you plug it in.
A driver is often confused with firmware. Firmware is software stored and running on the device itself, while the driver runs on the computer's main CPU as part of the operating system, and the two cooperate. A driver is also an extension to the kernel, not the kernel itself. The word driver also appears in database drivers, which are ordinary client libraries that speak a database's network protocol and have nothing to do with hardware.
Key takeaways
- A driver translates generic operating system requests into device-specific commands.
- Most drivers run in kernel mode, often as loadable kernel modules.
- Drivers handle a device's interrupts and data transfers.
- A buggy kernel driver can crash the entire system.
- Firmware runs on the device; the driver runs in the operating system.
Example
# List PCI devices and the kernel driver each one uses
lspci -k | head -n 12
# List loaded kernel modules, many of which are drivers
lsmod | head -n 5
# Show details about one driver module (an Intel network driver)
modinfo e1000e | head -n 5Readers ask
What is the difference between a driver and firmware?
Firmware is software built into the device and runs on the device's own chip. A driver runs on the computer as part of the operating system and tells the device, through its firmware, what to do.
Why can a bad driver crash the whole computer?
Most drivers run in kernel mode with full access to memory and hardware. If a driver has a bug, such as writing to the wrong memory address, it can corrupt the kernel itself, and the system has to stop.
Do I need to install drivers manually?
Usually not. Modern operating systems ship with drivers for most common hardware and fetch others automatically, though specialized devices and the newest graphics cards may still need a separate driver install.
See also
- KernelOperating Systems, p. 17A kernel is the core part of an operating system that manages the CPU, memory, and hardware devices and controls how programs get access to those resources.
- InterruptOperating Systems, p. 16An interrupt is a signal to the CPU that an event needs immediate attention, making it pause its current work and run a special handler in the kernel.
- User SpaceOperating Systems, p. 36User space is the restricted area where ordinary programs run, kept separate from kernel space so a buggy or malicious app cannot take down the whole system.
- System CallOperating Systems, p. 31A system call is a request from a program to the operating system kernel to perform a privileged action, such as reading a file or starting a process.
- File DescriptorOperating Systems, p. 10A file descriptor is a small integer that a Unix-like operating system gives a process to refer to an open file, socket, pipe, or other input/output resource.
- BootloaderOperating Systems, p. 1A bootloader is a small program that runs after the computer's firmware starts, loads the operating system kernel into memory, and hands control over to it.
Spotted a mistake or something missing on this page?Suggest an edit