5 ms·
You assume microkernel means small, which is a bad assumption. Microkernels can be fat too, There are dozens of monolithic kernels smaller than the average micr
by zokula 6y ago
You assume microkernel means small, which is a bad assumption. Microkernels can be fat too, There are dozens of monolithic kernels smaller than the average microkernel.
- tutfbhuf 6y agoThere are always exceptions to the rules. As from Wikipedia: "In terms of the source code size, microkernels are often smaller than monolithic kernels. The MINIX 3 microkernel, for example, has only approximately 12,000 lines of code". But to satisfy your definition needs, I refer to small microkernels.
- marcan_42 6y agoThe kernel is small, because all the extra stuff is outside the kernel. It's still stuff that exists and consumes RAM.
- tutfbhuf 6y agoNo, because e.g. the monolithic linux kernel is filled with many things that you do not need (but others do) in very constrained environments. If you have a very small microkernel, then you can very explicitly only install the software in user space that you need, without having them pre-installed via kernel.
- hkt 6y agoReally, the term "micro" is about size, not functionality. The fact is, the Linux kernel can be compiled with features to suit constrained environments. It is just that these features are determined at build time, not run time.
- tutfbhuf 6y agoYes, that is true but there are limits as I've explained here: https://news.ycombinator.com/item?id=25544271 https://news.ycombinator.com/item?id=25544271 Also quite interesting this question already came up on Quora https://www.quora.com/What-is-the-smallest-in-size-Linux-kernel https://www.quora.com/What-is-the-smallest-in-size-Linux-ker... and also on many other websites: https://superuser.com/a/370588 https://superuser.com/a/370588
- marcan_42 6y agoYour argument doesn't make any sense. You are saying microkernels are more modular in feature selection than monolithic kernels. That is not an inherent property if microkernels, nor is it true in practice. Nothing says a monolithic kernel can't have much more fine grained build time feature control than a microkernel where only entire services can be disabled (by not running them). Any reasonable monolithic kernel targeting embedded systems, including Linux but also anything smaller, will have a ton of build time options to slim down the system as needed. A microkernel with feature control at the process/service level would actually have much worse feature control than Linux, because Linux build time configuration options are often quite a bit more finer grained than that. For example, you can build Linux for uniprocessor systems, which makes global build-time changes that disable certain kinds of locks, which makes it smaller globally. A microkernel could or could not have the same build-time feature; it is not guaranteed to. As others have pointed out, microkernels have performance overhead and that reason alone makes them unsuitable for an N64. On a game console you need all the performance you can get.
- tutfbhuf 6y agoThe problem is that you can only slim down linux so much. If the tiniest possible linux does not fit on your chip, then it simply does not fit, end of the story for linux in this case. However, there are tiny microkernels e.g. with less than 50.000 lines of C code that can fit on such a device + leave some room for a small application e.g. also smaller than 50.000 lines of C that also fits. This is all I want to say. And yes, I agree with all the other points/drawbacks including performance that people mention here.