Kernel Modules and Device Drivers

In Linux

LDD3: Chapters 1 & 2

Questions to answer

  • What are devices and drivers?
  • What are Linux kernel modules?
  • How are these concepts related?

What is a device?

  • Examples: screen, keyboard, mouse, network interface, printer
  • The "organs" of the computer
  • A component of the computer that the cpu can interact with electronically

What is a device driver?

  • Bridge OS/Hardware gap
  • Allow users to talk to device
  • OS ↔ driver ↔ CPU ↔ devices


What is a Kernel Module

  • Snippet of code that can be added to a running kernel

Why Kernel Modules for Device Drivers?

  • Keep kernel text/data minimal
    • Less error surface
  • More customization
    • Can add hardware at runtime
  • Easier to develop
    • Change text/data without reboot

The End