How can a computer use a printer it has never met?
Your operating system cannot know every printer on Earth, so it hires a translator for each one: the driver.
▶ Start the storyA computer can use a printer it has never met because of a small program called a device driver. A driver is software that controls one particular kind of device and gives other software a standard way to talk to it. Its main job is to act as a translator between a hardware device and the programs or operating system that use it.
The translator is needed because devices speak different languages. Take two ways of sending data down a serial line: the commands for one chip are very different from the commands for a adapter. Yet each has its own driver, and each driver presents the same, or a similar, interface to the rest of the system. A programmer can write "send data" once without caring which gadget will receive it. Even something as familiar as drawing a pixel follows this path: an application asks the kernel, which forwards the request to the display driver, which actually plots the pixel.
Step 1: Application
Asks to show something on screen
Step 2: Kernel
Forwards the request
Step 3: Display driver
Translates it for this particular screen hardware
Step 4: Screen
The pixel is plotted
Drivers are specific to both the hardware and the operating system, so each gadget needs its own matching one. Modern systems try to find it for you. In systems the system scans the buses, such as , to detect devices and then searches for the appropriate drivers.
There is a price for this power. Drivers need low-level access to hardware, so they usually run in a highly privileged environment and can cause system problems if something goes wrong.
Quiz me
0/3
Recap
A driver is a translator between the operating system and one piece of hardware.
💡 A trick to remember it · One interpreter per gadget: the OS speaks one language, the driver turns it into printer, screen or keyboard.
Surprising fact · Most drivers run with kernel privileges, so a faulty one can crash the whole system.
Sources (2)
No source, no claim. Every fact in this lesson (16 claims) cites at least one of these.