Linux: Device drivers

Device drivers interface applications to hardware.They are run in Kernel space. they are part of Kernel process and are loaded dynamically. 

Linux provides a feature called Kernel modules through which we can extend the functionality of the Kernel at run time.

Device Drivers in Linux are Kernel Modules. 
Device drivers are classified into three types:
  1. Character device driver
  2. Block device driver
  3. Network device driver
Character Device driver:
  • Device which works on stream of bytes. 
  • This type of device is exposed to client via character device driver. 
  • Driver implements – open, close, ioclt, read, write, mmap functionality. 
Block Device driver:
  • Devices which work on data chuncks/blocks. Example Hard disk/Flash drives. 
  • Block drivers have a completely different interface from character drivers. 
Network interfaces:
  • Any network transaction is made through this interface. 
  • Interface is defined and implemented for communication with network drivers by linux kernel.

No comments:

Post a Comment