Kernel Modules

 

Sections of kernel code that can be compiled, loaded, and unloaded independent of the rest of the kernel.

 

A kernel module may typically implement a device driver, a file system, or a networking protocol.

 

The module interface allows third parties to write and distribute, on their own terms, device drivers or file systems that could not be distributed under the GPL.

 

Kernel modules allow a Linux system to be set up with a standard, minimal kernel, without any extra device drivers built in.

 

Three components to Linux module support:

    1. module management

    2.driver registration

    3. conflict resolution

 

Module Management

 

Supports loading modules into memory and letting them talk to the rest of the kernel.

 

Module loading is split into two separate sections:

 

   1. Managing sections of module code in kernel memory

   2. Handling symbols that modules are allowed to reference

 

The module requestor manages loading requested, but currently unloaded, modules; it also regularly queries the kernel to see whether a dynamically loaded module is still in use, and will unload it when it is no longer actively needed.

 

Driver Registration

 

Allows modules to tell the rest of the kernel that a new driver has become available.

 

The kernel maintains dynamic tables of all known drivers, and provides a set of routines to allow drivers to be added to or removed from these tables at any time.

 

Registration tables include the following items:

  1. Device drivers

  2. File systems

  3. Network protocols

  4. Binary format

 

Conflict Resolution

 

A mechanism that allows different device drivers to reserve hardware resources and to protect those resources from accidental use by another driver

 

The conflict resolution module aims to:

 

   1. Prevent modules from clashing over access to hardware resources

   2. Prevent auto probes from interfering with existing device drivers

   3. Resolve conflicts with multiple drivers trying to access the same hardware

 

                                                                                                                                                                                                             BACK