Microkernel vs Monolithic design

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pepito

Microkernel vs Monolithic design

Post by pepito »

For a OS developer beginner, as I am, which design approach is better to follow:

- The microkernel approach design
- The monolithic approach design

Thank you

pepito
VE3MTM

RE:Microkernel vs Monolithic design

Post by VE3MTM »

This is really the ultimate question of choice in the design of an OS. There are advantages and disadvantages to both.

Monolithic kernels have an immediate advantage of performance. They call functions in other parts of the kernel like in normal programs. However, failures in one part of the kernel is most often fatal. There is no way (in general) to restart a module if it has a problem. They are easier to write, because there is no messaging code for interprocess communication.

Microkernels tend to be slower (by how much depends on the implementation), but more stable. Just like with normal programs in an operating system, parts of a microkernel can be restarted if they crash. Extra support code is required to allow for clean, efficient interprocess communication and control. Because of this, it takes more work to get a microkernel up and running

Really the choice comes down to you. If you want a nice, clean, expandable system, you might want to op for a microkernel, otherwise you might want to write a monolithic kernel
pepito

RE:Microkernel vs Monolithic design

Post by pepito »

Thank you very much!

If the monolithic kernel is easier to write, then I prefer it to begin with.
Just a little question: What is the meaning of interprocess communication?

pepito
carbonBased

RE:Microkernel vs Monolithic design

Post by carbonBased »

IPC, in general, is a method for two programs/processes to talk to each other.

Typically, each process in an OS is in its own memory space, which means it has no knowledge, nor access, to any other process.  IPC allows these two separate processes to communicate to each other.

You can implement it any number of ways... with a mailbox metaphore, using interrupts, with another "global" IPC process, etc, etc.  There're many ways.

Cheers,
Jeff
pepito

RE:Microkernel vs Monolithic design

Post by pepito »

Sorry,
What kind of information is exchanged between process?
Why is important the processes to communication?

pepito
VE3MTM

RE:Microkernel vs Monolithic design

Post by VE3MTM »

In monolithic designs, processes (essentially programs) don't communicate between each other too much, unless you consider network sockets to be IPC. However, in a microkernel, this is essential. Say, for example, you have a working microkernel. You'll have things like file system drivers running as seperate processes. If a program wants to write something to disk, it will query the file system process to write the data to the disk, and in that query will be the file name, the data, maybe attributes for the file.
pepito

RE:Microkernel vs Monolithic design

Post by pepito »

Ah!, thank you...

pepito
Post Reply