|
Be quite clear, I'm not comparing Linux+x86 to Darwin+PowerPC. I compare Linux+PowerPC to Darwin+PowerPC. Linux+PowerPC is thoroughly faster than Darwin+PowerPC.
Your serious reservations are naive. As I said, benchmark it yourself. Or go read the conference proceedings from SOSP in the 90's, and see the papers rip Mach apart, and show why Mach gave microkernels a bad reputation. Microkernels can be fast. Mach is the opposite of fast. Just look at the source code of Mach and BSD in Darwin: they are not designed for speed, but for software management (i.e., to keep things well modularlized). Just one example: in Linux, the parameters for a system call are passed directly via the register file. In Darwin, they are packed up in a memory buffer, passed around, and the results are passed back via another memory buffer, and then everything written back to the register file. That just does wonders for the cache and TLB.
By the way, the I/O and IP stack on Darwin is not fast. It is easy to verify by benchmarking; you can convince yourself rather than believe me. And Darwin doesn't even scale beyond a single processor. When you add Apple's second processor (ever wonder why they don't sell more than two processors?), the performance gap between Linux and Darwin will probably become larger (I haven't measured this myself), but it is easily evident, since Darwin uses several big-kernel-locks, while Linux uses fine grained locking. If the IP stack of Darwin runs on one CPU, it can't for the most part run concurrently on another CPU. Likewise for the I/O system. Fast, huh?
I have an idea for an alternative demonstration of Darwin's diminutive performance. There is currently a project to add Darwin compatibility to BSD and Linux. Go find this project, and try it out. You'll see, without a doubt, that Linux is still faster than Darwin when running Darwin applications, all on PowerPC.
|