Love4Boobies wrote:By the way, I read that microkernels are a pain because distributed algorithms are a pain. I'm not sure I got that right, if someone could explain...
Are you referring to what Linus said in the latest incarnation of the Torvalds vs. Tanenbaum debate? IIRC, his key point there was that it's easier to manage key shared data structures in one big address space rather than in a distributed way in a bunch of separate processes. IMO, this is somewhat of a straw man born of the facts that Linus has never himself developed a microkernel, and that he tends to exaggerate in order to win arguments.
However, there is an important point in what he says, given the changing hardware topology. With many-core processors, it's going to become very inefficient to keep a single copy of each major kernel data structure (free page lists, scheduler queues, virtual address space descriptors, page tables, etc.) and share it between all the CPUs due to extra bus traffic caused by cache synchronization. I think there will be an increasing trend towards having CPU-local versions of these data structures, and needing to synchronize between them. Keeping them coherent can be tricky, but if things are designed well, it shouldn't be needed very often (e.g. -- Keeping CPU-local pools of threads to run, and balancing between CPUs only occasionally or when a CPU becomes idle).
Love4Boobies wrote:Well, they only perform reasonably well in certain situations. Can you show the contrary?
Nope, I think you're right actually.
QNX is a real-time OS and probably runs well on 1 to 2 CPU cores, but I'd be surprised if it scaled much beyond that given its reliance on synchronous message-copying IPC. L4 does well on IPC micro-benchmarks, but I'm skeptical that this can translate into good overall system performance.
There is one fast microkernel out there that I know of: Singularity. It's fast because its IPC involves passing pointers around because everything lives in Ring 0 by default.