The device driver is attached to the computer, in order to provide it with the right software that can be used to interface with the hardware devices. It also enables other computer programs to gain access to the functions of a given piece of hardware. This eliminates the need to have very precise details of what hardware needs to be used. The device driver is therefore, a conduit of functionality. In order to achieve this it uses a communications subsystem that is commonly known as a computer bus.
The process starts when a calling program requests a certain routine, which passes through the driver in order to command the device to perform that particular function.
Invoking routines and controlling use
If there is a faulty device driver, then it becomes very difficult to use that driver. All hardware functionality is dependent on the operating system and the messages from that operating system pass through the device driver. It is what is known as interrupt handling in industry jargon. This is what is required for asynchronous hardware interfaces that are time-dependent. One of the things that one has to be aware of is the distinction between Kernel and User modes. The Microsoft Windows platform allows you to run in kernel mode which is “Ring 0 on x86 CPUs”. Alternatively, you can run in the user mode which is “Ring 3 on x86 CPUs”.
The advantages of the user mode include an increased level of stability. For example, a user mode that has not been written correctly will not crash the system. This could happen if it can overwrite the Kernel memory. However, you need to be wary of the fact that the transition from kernel to user can entail a rather large performance overhead. This could have the effect of prohibiting the user-mode drivers, especially if they incorporate throughput requirements and low latency. It is through the use of system calls that you will be able to access the Kernel space. In this case the user space includes programs such as GUI and UNIX. The kernel supported functions allow the application to interact with the hardware.
Operation and usefulness
These can work with adapters, printers, network cards, buses, sound cards, storage devices, CD-ROMs as well as all types of floppy disk busses such as SATA, ATA and SCSI. The sound cards with local buses, particularly for mastering. The list of low-bandwidth buses includes USB ports, keyboards and mouse. They are also applicable to image scanners and digital cameras. It is expected that there is a certain sliding scale of abstraction, which includes direct interfacing; writing on a device control register; working with a higher level interface such as BIOS; operating with a lower-level device driver and simulating using hardware.
In the case of software, you have the same sliding scale that starts with allowing the operating system to directly access the hardware resources. On another level, you can use primitives or using an interface via the operation of a non-software package such as TWAIN. Finally, you can use an implementation language such as PostScript.