what is a device driver?


What is a device driver in operating systems?

In: 3

Also, what is the difference between a driver and firmware?

The driver is a piece of software that translates the functionality of a device into a format that the operating system expects. The creator of a PC component can take certain liberties in its design to make it have the best possible performance under the constraints of space and power consumption. Other programs expect all devices of a category, such as sound cards or printers, to behave in the same way without accounting for special cases when a new model is released. The driver accomplished that. It allows a new device work in an operating system programmed years ago.

A firmware is compact low level software that is written into the memory of the device itself as opposed to being loaded from the hard disk. It allows the device to perform some basic functions autonomously without immediate direction from the central processor, like turning on, moving a motor, illuminating indicators, combining data from its sensors to be presented to the computer as a packet.

Devices are discrete parts of the computer, right? Like a network card or an optical drive or a video card, right? Drivers tell the operating system how to work it, how to send instructions to the device and how to interpret whatever information it gets back from the device and incorporate that with that the OS wants to do.

Firmware is code on the device itself that tells it how to do stuff regardless of what computer or OS it resides in.

So if you were driving a delivery truck the knowledge in your brain on how to drive the truck would be the firmware instructions and your boss telling you where to drive and drop off your load and what else to pick up would be the drivers.

A device driver is essentially an instruction manual for the computer that tells it how to use the device you just plugged in. it gets its name because you can say the driver teaches the computer how to *drive* the device, like you would drive a car or somesuch.

Different kinds of computers (an Apple Mac vs a Windows PC, for example) speak different “languages” (not programming languages, just metaphorical languages) and thus each one needs a different driver. The same way a person who speaks English and a person who speaks French will need different manuals to read.