The idea of a microkernel is good (if your hardware sucks, i.e. RISC) because it adds to reliability and turns kernel drivers and "components" into normal programs that can be written in any language, but these microkernels all suck because they're written in C and designed for UNIX. Like JavaScript is better than C, these C/C++ microkernels are better than UNIX, but they still suck. If there was a microkernel that's not written in C or C++ and not designed for UNIX/POSIX, it probably wouldn't suck.
Subject: I Have Seen The Future Of The Future And It Sucks Too.So I figured I was better than your average unix-hatersreader since, hey, I hack Mach kernels; I'm not justbitching about how bad things are, I'm actually doingsomething about it, damn it!Well, it all started with when my research version of Machwent down in flames and took bits and pieces of the filesystem with it. In hindsight, I suppose I should have justlived with things like not being able to print to certainprinters. Well anyway, I had the Facilities people "add 10megs or so to the root partition, oh and while you're at it,why don't you rebuild the disk since the filesystem's beenkind of flaky since that, uh, big kernel crash last week..."So anyway, I came in today and found a brand spankin newfilesystem. All I had to do was replace the v2.5 productionkernel with a v3.0 research kernel. Yep, just replace acouple files on the root partition and reboot, no problem.Well, it's a little more complicated than that. For someunknown reason, mach machines have a "root" directory ("/")and a "superroot" directory ("/../.."). Once someone triedto explain why but I didn't quite get it.Anyway, you have to have hard links to your kernel file inboth root directories. Then since mach is not a kernel buta microkernel (the micro kernel binary with symbol tables,debugger, etc is a svelte 950k on a MIPS box, unix emulationis only another 1500k; I actually *needed* the extra 10 megson the root partition) you have to create a mach_serversdirectory and populate it with various programs that machuses to emulate unix.Now the tricky part is that since you have two rootdirectories you can put the mach_servers directory in theroot directory and then put a symlink in the superroot oryou can put the mach_servers directory in the superroot andput a symlink in the root directory. The documentation says you can do it either way.Unfortunately, the documentation doesn't say that it onlyworks when you put mach_servers in the superroot with asymlink in root. This also happened to be the second casegiven in the documentation and I had the misfortune to usethe first case given in the documentation. Silly me.So I proceeded to boot my machine 10 or 12 times only tocrash into the kernel debugger every time. I stared atstack traces and read code and read code and stared at stacktraces. The error messages were no help, they said "initdied". Thanks a lot.So I finally figured that one out and redid the mach_serversdirectory and rebooted once more. It crashed again at aboutthe same place complaining about "error 6000". Now theannoying thing about mach is that since your operatingsystem is spread out over 69 different address spaces, younever really know for sure who is generating an error code.You just have to memorize a mapping from error code rangesto subsystems. Eg errors in the 2500's are from thedevice-independent device routines (go figure), -300's arearg checking errors in an IPC stub routine, you get theidea. Well anyway, I never ran across 6000 before. So Ihit the source code again... Oh. Error 6000 means somefile is not executable. One of those damn programs in mach_servers was trying toexec another of those damn programs in mach_servers whichunfortunately didn't have it's execute bit set so naturallythe exec function, in it's penultimate moment of existence,exclaimed "6000!" before it crashed the whole show.I guess the moral is that Mach looks like unix on theoutside but does totally different stuff internally.However, when you strip away the tasks, threads, ports,messages, and memory objects, when you get down to the veryessence of the system, the thing is still unix. There is nohope.