Question-1 Explain device driver in OS.
- Each Controller has some device registers used to give it commands or read out its statues or both.
- For example mouse driver has to accept information about position of pointer and which buttons are currently depressed.
- I/O devices which are plugged with computer have some specific code for controlling them. This code is called the device driver.
- Each device driver normally handles one device type, or at most one class of closely related devices.
- Generally device driver is delivered along with the device by device manufacturer. Each driver handles one type of closely related devices.
- In order to access the device’s hardware, meaning the controller’s registers, device driver should be a part of operation system kernel.
- Device drivers are normally positioned below the rest of Operating System.
Functions of device drivers:
o Device driver accept abstract read and write requests from device independent software.
o Device driver must initialize the device if needed. It also controls power requirement and log event.
o It also checks statues of devices. If it is currently in use then queue the request for latter processing. If device is in idle state then request can be handled now.
o Controlling device means issuing a sequence of command to it. Device driver is a place where command sequence is determined, depending upon what has to be done.
o Pluggable device can be added or removed while the computer is running. At that time the device driver inform CPU that the user has suddenly removed the device from system.
Figure – Logical positioning of device drivers. In reality all communication between drivers and device controllers goes over the bus.
You may be interested in:
Operating System Short Descriptive Questions and Answers