January 14th, 2003, 05:10 PM
Linux - Kernel Modules
Whats the deal with kernel modules? Can kernel modules be used for most things that would require re-compiling the kernal? If so what is the advantage of re-compiling over using modules?
[shadow]The hunter who chases two rabbits catches neither[/shadow] - Zen Master
All programmers are playwrights and all computers are lousy actors.
January 17th, 2003, 05:43 PM
Modules get loaded when needed whereas if you compile support into the kernel it is always available..... i.e. if you need something often - compile it in.... if you rarely need it - load it as a module.
.....Brain Failure....dumping core.... z z z
January 17th, 2003, 08:48 PM
The kernel modules don't necessarily prevent you from having to recompile the kernel. The only things the modules do, is save you the overhead of having unnecessary features in the kernel at runtime.
If you have a feature you only use occasionally, for instance a usb device only occasionally plugged in, or such like, having kernel modules saves the kernel the need to have the driver permanently in memory.
Some features, although they can be compiled as modules, can only be loaded into a kernel which had them enabled at build time itself. This has caused a source of annoyance in the past.
As far as I know, most "normal" drivers (ethernet, video, usb etc) can be recompiled and installed without a reboot.
It's also useful to developers, who can modify the driver without having to do a reboot (unless it crashes the system or leaves the hardware in a dead state)