You are not logged in.

#1 2009-06-24 07:27:04

TjPhysicist
Member
From: Waterloo, Canada
Registered: 2008-04-12
Posts: 126
Website

monolithic kernel

First off I am aware this is a subject that can quickly get into a flame war (comp.os.minix discussion comes to mind). Anwyas on to the matter at hand:

As i understand it Linux is basically a monolithic kernel with (optional?) modular support. I have been told that originally linux and other kernels were basically monolithic in structure no modules either. My question here is two fold:

a. How many of you use a monolithic linux kernel (i.e. you have disabled module support while compiling), and why.
b. What are the advantages that you have noticed with/without modular support.

As someone who is slowly getting into kernel hacking, I have tried it all from everything possible as modules to fully monolithic (my current configuration is the latter). I am briefly aware of pro's and con's on both sides, I want to get some input from the arch community about this though.

The main reason behind this post is to see how many of you out there compile with no modules of course, and your experiances with said kernel.


-Tj
Now reborn as Tjh_ (to keep it similar to my username in other places)

Offline

#2 2009-06-24 08:17:01

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: monolithic kernel

Would there be very many? Would a monolithic kernel be able to use VirtualBox PUEL, or the nvidia/ati binaries? I'd think that alone would rule out a sizeable number of users.

For myself, I always compile modules, as an nvidia user. Read somewhere that the speed of context switching means built-in modules may not give that much of a boost, if any.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2009-06-24 09:06:44

PJ
Member
From: Sweden
Registered: 2005-10-11
Posts: 602

Re: monolithic kernel

The only advantage I can find for not compiling module support is that it will be a lot harder to insert a rootkit in the system, other than that I don't see any real advantages. I haven't compiled kernels in years, but when I last did it used to be a lot easier to do it without module support and that is actually the last time I did compile my own kernel. Nowadays I am pretty happy with the stock kernel that comes with Arch Linux.

Offline

#4 2009-06-24 09:09:13

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: monolithic kernel

I see no reason to compile everything into the kernel. Compiling the filesystem/sata-drivers into the kernel is handy, since you won't need an initramfs (but the gain is often abysmal).

Offline

#5 2009-06-24 10:14:13

davvil
Member
Registered: 2008-05-06
Posts: 165

Re: monolithic kernel

Do not confuse "monolithic" in a operating system design context with monolithic in the sense of "non-modular". From a design point of view, Linux is a monolithic kernel, independently if you compile it with or without modules support. The kernel is a big "binary blob" that runs in privileged mode. Compare this with a microkernel architecture (e.g. minix), where the filesystem, the scheduler and many other services are separate processes that run in unprivileged mode.

Offline

#6 2009-06-24 16:26:10

TjPhysicist
Member
From: Waterloo, Canada
Registered: 2008-04-12
Posts: 126
Website

Re: monolithic kernel

@davvil: o yea i understand the difference, lol. thanks for confirming that.


-Tj
Now reborn as Tjh_ (to keep it similar to my username in other places)

Offline

#7 2009-06-25 01:49:09

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,577

Re: monolithic kernel

davvil is right. But modules vs a solid kernel? Modules are nice for distro defaults, because you can add them in separate packages, etc. When you compile your own kernel, you can tune for exactly what you need, so unless you want to enable/disable certain functionality, there's no reason not to compile the modules in. I think there's some other benefits, but I've forgotten.

Offline

#8 2009-06-25 15:10:23

von_Wanderlust
Member
Registered: 2008-11-03
Posts: 67

Re: monolithic kernel

PJ wrote:

The only advantage I can find for not compiling module support is that it will be a lot harder to insert a rootkit in the system

Funny you mention that, I saw on LWN.net today that 2.6.31 will allow you to block loading of modules through sysctl.

Offline

#9 2009-07-03 08:27:48

DevoidOfWindows
Member
Registered: 2009-05-24
Posts: 133

Re: monolithic kernel

I will load important things into the kernel, but everything else is a module.  There are some things what will kill my system at boot if I don't compile as a module (e.g., AGP/Radeon).

Last edited by DevoidOfWindows (2009-07-03 08:29:20)

Offline

#10 2009-07-03 08:33:53

combuster
Member
From: Serbia
Registered: 2008-09-30
Posts: 711
Website

Re: monolithic kernel

Same here, basic drivers needed for my laptop are going into kernel but I don't want to loose support for various external devices by not building them at all and I'm not too keen on growing my bzImage with that stuff so I compile them as modules...

Just now I'm compiling 2.6.30.1 smile

Last edited by combuster (2009-07-03 08:34:38)

Offline

#11 2009-07-03 09:53:49

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: monolithic kernel

Things like the ipw2200 driver NEED to be a module, because first the firmware has to be loaded, then the module can be loaded.

Offline

#12 2009-07-03 17:53:25

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: monolithic kernel

The Linux kernel is monolithic.
The post title should be changed to "Static Kernel or Modular" in order to more accurately convey what you are describing.

Offline

#13 2009-07-04 21:16:41

darthaxul
Member
Registered: 2008-09-24
Posts: 156

Re: monolithic kernel

When Linus Torvalds decided to build a "free Unix for the 386″ he stripped away Tanenbaum's layered micro-kernel and hardwired Intel's approach to interrupt management directly into what has since become the largest monolithic kernel still in use....LOL

monolithic kernels are scary.
I'm gonna switch to micro or at least something else here pretty soon.
...ok im gone for good.

Last edited by darthaxul (2009-07-04 22:25:54)

Offline

Board footer

Powered by FluxBB