Device Drivers are the software through which the kernel of a computer communicates with different hardware without having to go into the details of how the hardware works. It is software that controls a hardware part attached to a computer and allows it to use the hardware by providing a suitable interface. This means that the operating system need not go into the details about how the hardware part works. It also provides a common interface so that the operating system or the Kernel can communicate with the hardware.
Thus, the purpose of device drivers is to allow smooth functioning of the hardware for which it is created and to allow it to be used with different operating systems.
Device Driver Types – Kernel & User Drivers
There are device drivers for almost every device associated with a computer – from BIOS to even virtual machines and more. Device drivers can be broadly be classified into two categories:
- Kernel Device Drivers
- User Device Drivers
Kernel Device Drivers are the generic device drivers that load with the operating system into the memory as part of the operating system; not the entire driver but a pointer to that effect so that the device driver can be invoked as soon as it is required. The drivers are pertaining to BIOS, motherboard, processor, and similar hardware form part of Kernel Software.
A problem with Kernel Device Drivers is that when one of them is invoked, it is loaded into the RAM and cannot be moved to a page file (virtual memory). Thus, a number of device drivers running at the same time can slow down machines. That is why there is a minimum system requirement for each operating system. The different operating systems already add up the resources needed for kernel device drivers, so end-users need not worry about extra memory requirements.
User Mode Device Drivers are the ones usually triggered by users during their session on a computer. It might be thought of as devices that the user brought to the computer other than the kernel devices. Drivers for most of the Plug and Play devices fall into this category. User Device Drivers can be written to disk so that they don’t act tough on the resources. However, for the drivers related to gaming devices, it is recommended to keep them in the main memory (RAM).
Read: How to manually install a Driver using a .INF File.
Block Drivers and Character Drivers
These two – the block and character device drivers – belong to the category of data reading and writing. Hard disks, CD ROMs, USB Drives, etc. – might be either Block Drivers or Character Drivers based on how they are used.
Character Drivers are used in serial buses. They write data one character at a time. One character means a byte in a generic sense. If a device is connected to a serial port, it uses a character driver. A mouse is a serial device and has a character device driver.
Block drivers refer to the writing and reading of more than one character at a time. Usually, block device drivers create a block and retrieve as much information as the block can contain. Hard disks, for example, use block device drivers. CD ROMs too, are Block device drivers, but the kernel needs to check that the device is still connected to the computer each time the CD ROM is invoked by any application.
Generic and OEM Drivers
Device drivers can be generic or OEM-related. If the device driver comes with the operating software, most probably it would be a generic device driver. A generic device driver is one that can be used with different brands of a particular device type. Windows 10, for example, has a number of generic drivers that work without having to install any other software manually.
In some cases, the generic drivers don’t help. So, the original equipment manufacturers create their own device drivers. These are OEM device drivers and have to be installed separately after installing the operating system. Computers of the older era were marked, and hence even the motherboard drivers had to be installed externally. But that was the age of Windows XP. Barring a few brands, most of the built-in driver sets are already contained in the operating systems.
Read: What is Firmware?
Virtual Device Drivers
Drivers for virtual devices are called Virtual Device Drivers. Often, we use some software to emulate hardware and the software used to run such virtual hardware is a virtual device driver. For example, if you are using a VPN, it may create a virtual network card for connecting securely to the Internet. It is not a real physical card, but one set up by VPN software. Even that card needs a device driver, and the same VPN software will install the virtual device drivers
Thus, you can see there are different types of device drivers, and it is a bit difficult to use just one or two categories to explain them. In this article, we explained what is a device driver and talked about the following device driver types: kernel and user mode driver; generic and OEM device drivers, and virtual device drivers – including the difference among all.
Read next: Where does Windows save or store Device Drivers?