Device Driver

Sanika Rawate
5 min readJun 19, 2022

--

In computing , there exists a software program or a different kind of software application that controls the hardware device or any sort of hardware devices which are connected with the computer’s operating system , they are known as device drivers .

The communication between the computer hardware and the device driver is enabled through a computer bus or computer subsystem.Device drivers are the most significant part of computer system for that to work efficiently. If a device driver is not present, any hardware will not function properly, i.e. the hardware will not do the specific activity for which it was designed. Device drivers are required for a computer system to function correctly. Without a device driver, the hardware fails to function properly, which implies it fails to do the task for which it was designed.

Drivers are Hardware-dependent and operating-system-specific . They normally manage interrupts for any asynchronous time-dependent hardware interface that is required. After the device provides data back to the driver, the driver can call the original calling program’s functions. The driver issues commands to the device when a calling application calls a driver’s routine.

TYPES OF DEVICE DRIVERS :

There is a Device Driver for practically every piece of hardware that is connected to a computer system. However, it can be divided into two categories: kernel-mode device drivers and user-mode device drivers.

Types of Device driver
  1. Kernel-mode Device Driver –
    This kernel-mode device driver includes various generic hardwares that are loaded with the operating system as part of the OS, such as the BIOS, motherboard, CPU, and other kernel-mode hardwares. These include the minimum system requirements for each operating system’s device drivers.
  • BIOS: BIOS (basic input/output system) is the most basic computer driver in existence. It is designed to be the first program that boots when a PC turns on. The BIOS is stored on memory built into the motherboard and is designed to boot the hardware connected to the PC, including the hard drives, video display output, keyboard and mouse.
  • Motherboard Drivers: Motherboard drivers are short programmes that are read by Windows or Linux and allow fundamental computer activities to be performed while the operating system is running. These drivers typically comprise programmes that enable internet ports, USB ports, and mouse and keyboard I/O ports. Basic visual and audio drivers may be included in the drivers, depending on the motherboard’s design.

2. User-mode Device Driver –
Aside from the devices that the kernel brings for the system’s operation, the user also brings some devices for usage when using the system. These devices require device drivers to function, and these drivers are classified as User mode device drivers. For example, a user may require any plug-and-play action that falls under this category.

WORKING OF DEVICE DRIVER :

To perform any action or to access a device the device drivers are dependent on the Operating System’s instruction. After the action they also shows their reactions by delivering output or status/message from hardware device to the Operating system. For Example a printer driver tells the printer in which format to print after getting instruction from OS, similarly A sound card driver is there due to which 1’s and 0’s data of MP3 file is converted to audio signals and you enjoy the music. Card reader, controller, modem, network card, sound card, printer, video card, USB devices, RAM, Speakers etc need Device Drivers to operate.

The following figure illustrates the interaction between user, OS, Device driver and the devices:

Interaction between user, OS, Device driver and the devices.

PURPOSE OF DEVICE DRIVER :

The main purpose of device drivers is to provide abstraction by acting as a translator between a hardware device and the applications or operating systems that use it. Programmers can write higher-level application code independently of whatever specific hardware the end-user is using.

For example, a high-level application interacting with a serial port may have “send data” and “receive data” functions. A device driver implementing these functions would communicate to the particular serial port controller installed at a lower level on a user’s computer.

The commands needed to control a 16550 UART are different from those needed to control an FTDI serial port converter. Still, each hardware-specific device driver abstracts these details into the same or similar software interface.

APPLICATIONS OF DEVICE DRIVER :

Because of the diversity of modern hardware and operating systems, drivers operate in many different environments. Device drivers may interface with Printers, Video adapters, Network cards, Sound cards, Local buses of various sorts, Image scanners, Digital cameras, Digital terrestrial television tuners, IrDA adapters, and Implementing support for different file systems. It also interfaces with:

  • Low-bandwidthI/O buses of various sorts for pointing devices such as mice, keyboards, etc.
  • Computer storagedevices such as hard disk, CD-ROM, and floppy disk buses (ATA, SATA, SCSI, SAS)
  • The radio-frequency communication transceiver adapters are used for short-distance and low-rate wireless communication in home automation, such as Bluetooth Low Energy (BLE), Thread, ZigBee, and Z-Wave).

Choosing and installing the correct device drivers for given hardware is often a key component of computer system configuration. Common levels of abstraction for device drivers include:

1. For hardware:

  • Interfacing directly
  • Writing to or reading from a device control register
  • Using some higher-level interface (e.g. Video BIOS)
  • Using another lower-level device driver (e.g. file system drivers using disk drivers)
  • Simulating work with hardware while doing something entirely different.

2. For software:

  • Allowing the operating system direct access to hardware resources
  • Implementing only primitives
  • Implementing an interface for non-driver software (e.g. TWAIN)
  • Implementing a language, sometimes quite high-level (e.g. PostScript)

CONCLUSION

The blog covers the basic idea of what exactly a device driver is; and the applications of device driver i.e where it is used with respect to hardware as well as software, its purpose and the working of the device drivers.

REFERENCES

https://www.javatpoint.com/device-driver-in-operating-system

https://en.wikipedia.org/wiki/Device_driver#:~:text=In%20computing%2C%20a%20device%20driver,to%20a%20computer%20or%20automaton.

https://www.geeksforgeeks.org/device-driver-and-its-purpose/

AUTHORS:

Sanika Rawate, Sakshi Manmode, Shivam Chaudhary, Resham Suryavanshi, Kunal Chanda.

--

--