カーネルモジュールとドライバーについて

Driver: A driver is a software component that allows an operating system to communicate with and control a specific piece of hardware, such as a graphics card, network adapter, or printer. Drivers are typically provided by the hardware manufacturer and are loaded into the operating system to enable it to interact with and manage the hardware device properly. Drivers can be part of the kernel (built-in) or loadable as kernel modules.


Kernel Module: A kernel module, also known as a loadable kernel module or LKM, is a piece of code that can be dynamically loaded into the running kernel of an operating system to add or extend its functionality. Kernel modules are often used to support new hardware devices or add additional features to the kernel without having to rebuild the entire kernel. While drivers are one type of kernel module (specifically, those that handle hardware), kernel modules can serve other purposes beyond hardware support, such as adding file systems, networking protocols, or other kernel-level services.

In summary, a driver is a specific type of kernel module responsible for hardware device interaction, but not all kernel modules are drivers. Kernel modules can serve various purposes within the operating system, extending its functionality in different ways.