Purpose
A device driver simplifies programming by acting as translator between a hardware device and the applications or operating systems that use it. Programmers can write the higher-level application code independently of whatever specific hardware the end-user is using. Physical layers communicate with specific device instances. For example, a serial port needs to handle standard communication protocols such as XON/XOFF that are common for all serial port hardware. This would be managed by a serial port logical layer. However, the physical layer needs to communicate with a particular serial port chip. 16550 UART hardware differs from PL-011. The physical layer addresses these chip-specific variations. Conventionally, OS requests go to the logical layer first. In turn, the logical layer calls upon the physical layer to implement OS requests in terms understandable by the hardware. Conversely, when a hardware device needs to respond to the OS, it uses the physical layer to speak to the logical layer.
In Linux environments, programmers can build device drivers either as parts of the kernel or separately as loadable modules. Makedev includes a list of the devices in Linux: ttyS (terminal), lp (parallel port), hd (disk), loop (loopback disk device), sound (these include mixer, sequencer, dsp, and audio)...
The Microsoft Windows .sys files and Linux .ko modules contain loadable device drivers. The advantage of loadable device drivers is that they can be loaded only when necessary and then unloaded, thus saving kernel memory.
Read more about this topic: Device Driver
Famous quotes containing the word purpose:
“Possibly the Creator did not make the world chiefly for the purpose of providing studies for gifted novelists; but if he had done so, we can scarcely imagine that He could have offered anything much better in the way of material ...”
—Elizabeth Stuart Phelps (18441911)
“And is the price for your acceptance for me to conform? To be as you would want me to be?... You must accept me as I am. Do not question.... If my behavior seems different perhaps it is because it serves a higher purpose than to find acceptance in this dull and useless world.”
—Pat Fielder, and Paul Landres. Dracula (Francis Lederer)
“A major misunderstanding of child rearing has been the idea that meeting a childs needs is an end in itself, for the purpose of the childs mental health. Mothers have not understood that this is but one step in social development, the goal of which is to help a child begin to consider others. As a result, they often have not considered their children but have instead allowed their childrens reality to take precedence, out of a fear of damaging them emotionally.”
—Elaine Heffner (20th century)