DragonFly kernel List (threaded) for 2006-08
Re: How much of microkernel?
On Tue, Aug 22, 2006 at 11:00:39AM -0700, Matthew Dillon wrote:
> One then winds up in a situation where one must hack the code to pieces
> to make it efficient... to reduce the number of context switches that
> occur. For example, a number of people have advocated that the TCP stack
> be moved to userland. To my mind this is *NOT* micro-kernelish, as one
> then has no protection between the userland application and the networking
> stack. Shifting the work around without introducing new protection
> realms is NOT a microkernel architecture. It offers no additional
> reliability or debuggability to the system, and makes the code such a
> huge mess that it becomes unmaintainable.
> Now, I am not against microkernel architectures... I've written several
> embedded OSs that use such architectures. But the plain fact of the
> matter is that there is a performance/protection trade-off and you have
> to be willing to pay the price to get the protection.
Folks use persistent mm maps to help with those context switches by locking in
certain memory areas that aren't invalidate during the context switch. It's a
commonly used in RTOSes to speed up context switching since they would like to
have memory protection as well. That'll have to added directly to the memory map
of the process as well as the base context switch logic itself. It's not too
hard to do overall, but folks rarely use userspace in this demanding a way under
general purpose operating systems.