Comparing the kernels

by Jeremiah Foster

Linus Torvalds once called the Apple kernel "peice of crap". Of course he is entitled to his views. Today he develops the linux kernel on an Apple computer though apparently stripped of the Apple operating system. In fact, in 1997, Steve jobs even asked Linus to work for Apple, presumably to fix the so-called "crap" kernel. Linus declined, and today we have many different kernels that hackers can hack on as we move forward in the free software eco-system.

Both kernels, XNU and linux, offer fundamentally different designs that reflect different philosophies but there are many similarities. By extension there are many similarities and differences between OS X (Darwin) and linux as operating systems.

I hope to use this blog to compare the two operating systems and to try to understand their impact on people who use them, largely from a free software perspective. With the upcoming Apple processor switch, the comparison between Apple and Linux seems timely; the unix wars are on us once again. Or maybe they never left.

Have your say;


2005-10-06 07:45:11
Linus and Apple
Linus Torvalds once called the Apple kernel "peice of crap". Yet today, he develops the linux kernel on an Apple computer

That's a non sequitur, isn't it?

Whether he's right or wrong - which I certainly wouldn't venture an opinion on - his Apple computer is not running OS X. So there's no "yet" about it.

He uses the hardware, because he was given it. And he likes it because he was interested in "the other architecture" (which Apple are, in any case, now abandoning). But, AFAIK, he doesn't use any Apple software at all.

2005-10-07 01:17:32
"Mac OS X' Achilles Heel"
There's a long and interesting analysis of some currently crap aspects of the Mac OS X kernel at Anandtech ( .

For my own part, at the time I started using Mac OS X at home in the days of 10.0, I had a rather long-in-the-tooth 250MHz SPARCstation on my desk at work. I was depressed to see just how much more time Mac OS X spent in the kernel in order to service system calls than did Solaris. And, while successive releases of Mac OS have improved, they're still far from great. It's interesting that Solaris takes the principals of fine-grained locking (or choosing the most appropriate flavour of locking, or avoiding locking entirely) much further than the Linux kernel, and especially than Darwin.

I wonder what Linus thinks of Solaris.

For more on Solaris internals, see the site for the definitive book ( . I suspect that the forthcoming third edition of O'Reilly's Understanding the Linux [2.6] Kernel will cover the same topics. I'd love to hear of a similar book for Darwin, but, to the best of my knowledge, none exists. (