What is a device driver, and what role does it play in the OS I/O subsystem?
Last updated
A device driver is the kernel module that knows how to talk to a specific piece of hardware. It translates the OS's generic, uniform I/O requests into the exact register operations, commands, and interrupt handling that particular device requires, hiding hardware detail from the rest of the kernel.
Its core role:
Presents a standard interface (open/read/write/ioctl) upward while driving device-specific registers and DMA downward.
Handles the device's interrupts and manages its command/status protocol.
Place in the I/O subsystem:
Sits below the device-independent I/O layer, which handles buffering, naming, and protection uniformly.
This layering lets the OS support new hardware by adding a driver, without changing applications or the rest of the kernel.
Why it matters:
Achieves device independence: apps use the same calls for a disk, SSD, or network device.
Usually runs in kernel space with high privilege, so a buggy driver is a common source of crashes: some OSes run drivers in user space for isolation.
- https://learn.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/what-is-a-driver-
- https://learn.microsoft.com/en-us/windows-hardware/drivers/kernel/types-of-windows-drivers
- https://learn.microsoft.com/en-us/samples/microsoft/windows-driver-samples/ioctl/
- https://www.geeksforgeeks.org/computer-organization-architecture/transforming-of-i-o-requests-to-hardware-operations/
- https://www.geeksforgeeks.org/operating-systems/device-independent-i-o-software-in-operating-system/
- https://operatingsystemsauthority.com/device-drivers-and-operating-systems/
- https://operatingsystemsauthority.com/device-drivers-and-operating-systems.html
- https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/13_IOSystems.html