An Introduction to Device Drivers
Role of Device driver
- Black boxes between user(applications) and hardware.
- Provide mechanism (what capabilities are to be provided) instead of policy(how those capabilities can be used)
Splitting the Kernel
- Process management
- Memory management
- Filesystems
- Device control
- Networking
Loadable Modules
- Extend kernel functionality at runtime. (like a slime?)
Classes of Devices and Modules
- char devices
- open, close, read, write.
- sequence stream access. (can’t move back and forth in the regular file)
- e.g., /dev/tty1.
- block devices
- can host a filesystem.
- only handle I/O operations that transfer one or more whole blocks.
- e.g., /dev/sda
- network interface
- no file node in /dev/.
- send / receive data packets.
- e.g., eth0
Security Issues
- If the kernel has security holes, then the system as a whole has holes.
- Security is a policy issue that is often best handled at higher levels within the kernel.
- e.g., buffer overrun, information leakage, etc.
Version Numbering
- stable: even-numbered kernel versions. (i.e., 2.6.x)
License Terms
- Version 2 of the GNU General Public License (GPL v2)
Overview of the Book