DEVICE DRIVERS Presented by: Group 7
What are Device Drivers? Device driver or hardware driver is a program that manages the system’s interaction with a particular piece of hardware.
Examples
Types of device drivers 1.SCSI- Devices attached to SCSI bus are easy to configure. Most systems have one driver that allows direct access to the SCSI bus, plus additional drivers for special types of devices such as disks & tapes.
2. Vendor: Devices are already supported by the OS. Unless you have explicitly removed drivers, the kernel will usually recognize a new device as soon as you install it. 3. Third-party: When you purchase a piece of hardware from a third party, it will usually come with an installation script that installs the device, configures the kernel if necessary, and makes devices entries.
Extensions Used Windows OS :.DLL or.EXE Linux: PPD Files(Postscript Printer Description) having ".ppd" or ".PPD" file extension & Standard file format for Linux printer drivers file.
Functionality AdD your slides from here
Windows
Outdated driver
Types: indirect n direct ??????????????????????????????
Architecture of Device Driver for windows
Security Issues & Precautions
Two phases : Deliberate vs. incidental damage One security problem is damage user can cause through misuse of existing programs or exploiting bugs. Second issue is what kind of misfunctionality a programmer can implement. Kernel modules present possibilities for both System does only rudimentary checks at module load time
Driver writer must be on guard for security problems. Do not define security policies Provide mechanisms to enforce policies Be aware of operations that affect global resources Setting up an interrupt line Could damage hardware Setting up a default block size Could affect other users
Beware of bugs Buffer overrun Overwriting unrelated data Treat input/parameters with utmost suspicion Uninitialized memory Kernel memory should be zeroed before being made available to a user Otherwise, information leakage could result Passwords
Avoid running kernels compiled by an untrusted friend Modified kernel could allow anyone to load a module
General Issues Windows : Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged Windows cannot verify the digital signature for the drivers required for this device Windows cannot load the device driver for this hardware because a previous instance of the device driver is still in memory
Linux : Blocking in Interrupt Context For interrupt driven block drivers, the strategy routine (request_fn) can be called from interrupt context but it cannot block. Fixed Size Buffer The buffer size for a device is fixed. To implement RAID5, we need to distinguish b/w full stripe write & partial stripe write as latter involves read-modify-write cycle.
Benefits of Using Advanced Versions Ensure peak performance of installed hardware Check for updated drivers using an extensive database Minimizes erratic behaviour and enhances PC performance Automatically scans system for latest drivers Full backup and restore functionality available in case of incompatibility issues Example: For Windows OS device drivers are fully compatible with 32 bit and 64 bit versions of Windows XP, Vista and Windows 7