Managing and Developing Dynamically Loadable Kernel Modules
Managing and Developing Dynamically Loadable Kernel Modules
Managing Dynamically Loadable Kernel Modules
Chapter 12 501
modules to be configured into the kernel while the system is running
❏ Conserving system resources by permitting the unloading of
infrequently used modules when not in use
❏ Providing administrators with the ability to demand load and unload
modules
❏ Providing the kernel with the ability to automatically load modules
DLKM Loading Concepts
When a module is dynamically loaded, its object file is read from disk
and loaded into newly allocated kernel memory. Once in memory, the
module’s symbols are relocated and any external references are resolved.
Special code in the module is then executed to perform any required
module-specific setup. Then the code specific to the module’s type, if any,
is executed, making the newly loaded module accessible to the rest of the
kernel.
A module can be loaded in the following ways:
❏ Demand Load
A demand load is a user level request for a specific module to be
loaded. The load is accomplished through the kmadmin command.