I don't think performance is that big of a deal actually. I think performance has historically been an issue because of historical reasons. Basically, if the OS is built like a POSIX OS, then it's not IPC/message heavy and that has influenced the overall design. If you then try to apply "microkernel" philosophy on-top you get performance penalties. The same, I think, applies to managed vs unmanaged, it's a different approach and if you run an OS that has been designed with unmanaged in mind, and then put managed layer between the OS and the app, you'll get performance penalties.simeonz wrote:There are quite a few options, come to think of it now. But the effect is the same - performance of a managed language. On the other hand, I agree that manually managing the resource may be more appropriate, considering that this is the only way to guarantee immediate resource reclaiming. So, you are basically right.LtG wrote:I think the main issue with "generic" languages isn't that they're unmanaged, it's pointers. So if you create a language without pointers it should be safe, and have good performance. You may need some unsafe parts (where pointers are allowed), and that part needs to be inspected or JIT'd, but JIT'ing isn't a requirement and neither is managed.
Even with the above, managed doesn't have significant performance penalties for many applications, so imagine if the OS was designed for a single managed language instead, and possibly used a single address space, it might even perform better.
More often than not (practically always), we (people) aren't that great at managing resources, so while the automated management of resources may have some overhead, it balances out due to the big picture complexities and the practical trade-offs people make (aka. C vs asm).
I prefer microkernels because they are simpler, in a way more structured, and I hope I can get it to perform better than a monolithic one.simeonz wrote:You mean that micro-kernels can target convenient development and unified APIs, or something else entirely? Because, the killer features for a micro kernel I believe are uptime and security. Let me put it this way - we don't use forks because we like the taste of metal.LtG wrote:In general, none of the things you list are micro specific. So some microkernels might allow driver restarts while another won't. Micro really only means that you push everything out to user space (into processes).
Of course, it doesn't really matter on what level you erect the security boundaries. You could achieve "microkernel security" with the traditional microkernel way (process isolation and everything is a process), you could do it at language level, etc. It's really all the same, in a way the OS's abstractions (processes for example) are an "extension" of any language.
So what I was trying to say was that microkernel isn't about stability, security or uptime, but rather a design philosophy that hopefully delivers those things. But still each OS/kernel is it's own thing and maybe achieves some of those things. A monolithic kernel written in a "perfect" language may very well be better than a microkernel written in C.