The kernel interacts with I/O devices by means of device drivers. Device driver is just set of instructions (Program) that interacts with I/O devices. Device drivers are included in the kernel and consist of data structures and functions that control one or more devices,such as hard disks, keyboards, mouses, monitors, network interfaces, and devices connectedto a SCSI bus. Each driver interacts with the remaining part of the kernel (even with other drivers) through a specific interface.
This approach has the following advantages:
• Device-specific code can be encapsulated in a specific module.This approach has the following advantages:
• Vendors can add new devices without knowing the kernel source code: only the interface specifications must be known.
• The kernel deals with all devices in a uniform way and accesses them through the same interface.
• It is possible to write a device driver as a module that can be dynamically loaded in the kernel without requiring the system to be rebooted. It is also possible to dynamically unload a module that is no longer needed, thus minimizing the size of the kernel image stored in RAM
In the Linux world each device is treated as file and all device related files are stored in /dev directory.
No comments:
Post a Comment