Managing and Developing Dynamically Loadable Kernel Modules

Managing and Developing Dynamically Loadable Kernel Modules
Managing Dynamically Loadable Kernel Modules
Chapter 12502
Autoload Event
An autoload occurs when the kernel detects that a specific module is
required to provide the functionality necessary to perform a task. The
load is triggered by the initiation of the task. Once the required
module is loaded, the task continues.
DLKM Unloading Concepts
When the functionality provided by a module is no longer needed the
module can be unloaded, thus freeing its resources for other uses.
When a module is unloaded, the code specific to the module, if any, is
executed to disconnect the module from the kernel. Then special code
in the module is executed to perform any module-specific cleanup.
Finally, the memory allocated to the module is freed.
A module may be unloaded only by a user level request. The unload is
accomplished through the kmadmin command. This request may fail
for a number of reasons, the most common being that the module is
busy at the time. An example of this would be attempting to unload a
device while there are outstanding opens on the device.
DLKM Configuration Concepts
Through the use of configurable module attributes, system
administrators can control the various functions of a DLKM module,
including whether it is dynamically loaded or statically configured.
The section “Developing Dynamically Loadable Kernel Modules” on
page 525, describes the required and optional component files and the
keywords and attributes which are configurable. It also presents a brief
description of STREAMS and Miscellaneous modules.
The section “DLKM Procedures” on page 508, presents detailed
instructions on how to modify the configurable module attributes, and
how to manage DLKM modules using the kernel configuration tool set.