Linked by Hadrien Grasland on Sun 20th Feb 2011 13:20 UTC
OSNews, Generic OSes Now that you have an idea of where your OS project is heading as a whole, it's time to go into specifics. The first component of your OS which you'll have to design, if you're building it from the ground up, is its kernel, so this article aims at being a quick guide to kernel design, describing the major areas which you'll have to think about and guiding you to places where you can find more information on the subject.
Thread beginning with comment 463395
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: kernel modules
by Neolander on Sun 20th Feb 2011 20:47 UTC in reply to "kernel modules"
Neolander
Member since:
2010-03-08

Afaik, microkernels are defined by the way they put some of the services they offer in isolated processes. Microkernels are intrinsically modular, but monolithic kernels *can* also be modular without becoming microkernels.

Whether monolithic kernels are modular or not, most of their main advantages and drawbacks remain, since most code runs in the same address space, in kernel mode, with full access to hardware. Modularity acts independently from that.

Edited 2011-02-20 20:54 UTC

Reply Parent Score: 1

RE[2]: kernel modules
by jack_perry on Sun 20th Feb 2011 21:45 in reply to "RE: kernel modules"
jack_perry Member since:
2005-07-06

Okay. So you could have a monolithic kernel that is actually quite small, and loads modules dynamically into memory as needed. The drawbacks of security would remain, and might even be worsened if the administrator was dumb enough to load an unsecure module to extend the OS' capabilities.

The reason I ask is that modularity could decrease code size significantly. You mention that it is common for desktop monolithic kernels to include facilities for rendering GPU-accelerated graphics and managing every single filesystem in existence, which, okay, could be bad if all these filesystems are in memory all the time, but isn't so bad if they are loaded only when needed. It likewise could provide a defense against what you cite as unmaintainable, non-portable, non modular code.

It makes me wonder whether most monolithic kernels do this in practice.

I guess I should say that this line of questioning is inspired by my acquaintance of Microware's OS-9, which I once heard described as neither monolithic nor micro but modular. But I don't know more than that, and even that was a distant memory.

Reply Parent Score: 2

RE[3]: kernel modules
by Neolander on Sun 20th Feb 2011 21:57 in reply to "RE[2]: kernel modules"
Neolander Member since:
2010-03-08

Indeed, more modularity can be used as a way to reduce the disadvantages of the monolithic approach on "large" kernels, without going as far as the microkernel approach. It's an interesting in-between solution.

On the other hand, there must be a policy somewhere that forces kernel devs to put new features in separate modules whenever possible. Otherwise, you get something like Linux : the kernel is modular, but outside of the realm of hardware drivers its modularity capabilities are heavily under-used (and since there's no standard, stable module interface, third-party module development does not work well... But that's another story)

Reply Parent Score: 1