Device drivers are software components, or blocks of code, that are specific to a device. They are often written by the manufacturer of IO devices and must be installed into a computer before an IO device may successfully interface with a computer. The chunks of code are part of the kernel-space because once they are installed, they don’t require user involvement to interact with device controllers.
Unlike device-independent IO software, device drivers are great for taking IO hardware beyond generic functionality. Device drivers allow for an IO device to be used to perform tasks that are specific to its hardware.
There are two types of device drivers:
- Kernel-mode drivers: These drivers allow for basic functionality on a CPU. They even contribute to the start-up of an operating system when we turn on our computers.
- User-mode drivers: When a user adds additional hardware to their computer, that additional hardware comes with its own set of drivers that need to be installed. For example, when we are in the process of installing a new printer and connecting it to our laptop.
Take a look at the image to your right. It is a pictorial representation of a CPU that shows us where device drivers exist. Note that both user-mode, and kernel-mode drivers are in the kernel-space. The image shows how device drivers receive interrupts and processes, and output processes.