A Unix Geek Looks At Mac OS X Vs. Linux "Debate"

An odd article recently popped up at Linux Journal at claiming that OS X can never be up to Linuxis performance on Apple hardware. The author, Mike Nordin, claims that this is because OS X uses a Mach microkernel where Linux uses a monolithic kernel instead. Iim no expert in this area, but this seemed odd for two reasons: ineveri is a long time, and I was under the impression that Darwin, the Unix under the hood of OS X, was using a kernel based on the Mach microkernel.

Mr. Nordinis argument is:

  • OS X uses the Mach microkernel
  • Microkernels are discredited
  • QNX uses a microkernel
  • QNX has problems that Linux doesnit
  • Mach therefore isnit as good
  • OS X will never be as quick as Linux on the same hardware.
If youire like me, youire thinking "So?" We use computers as tools, to get something done: send e-mail, write opinions such as this, keep track of tax records, edit photos, etc. If the performance is good enough, then most of us donit care (and I say that as a proud Unix geek). If deep down, under several layers, Mach is a bit slower, at what cost is the Linux kernel quicker? You canit go by raw speed; Helio Castronevesi car in the Indy 500 has a top speed near 240 m.p.h., but the engine is only designed to last just over 500 miles. This is not addressed in the article.

In addition, no numbers are presented. There are no benchmarks, sloppy logic, some condescension (calling Appleis choice "quaint"), and much hand waving. In fact, Mr. Nordin bases his findings on theory and not on empirical evidence. He himself says:

Iim not sure how Darwinis drivers work

in the middle of a discussion about how the drivers in microkernels take away some advantages that microkernels may have.

I could talk about the shortcomings, but the comments after the article spell it all out. First, the kernel is based on Mach 3.0 with a lot of BSD thrown in; it is now a monolithic kernel (or tantamount to one), just as Linux is. Information on Darwinis kernel is readily available on Appleis Web site which readily shows that much of Mr. Nordinis assumptions are specious. The comparison to QNX is a red herring at best. QNX is used for real-time, embedded systems, an area where Linux has made little headway and Darwin none that I know of. At least one person noted that OS X often runs on multiprocessor systems, so even if Mach is slower on most computers (using a single processor), it could be quicker on a multiprocessor machine, and thus a better choice for Apple. Whatis more, OS X is actually quicker than Linux (and Windows) in one place where speed is key: sound processing. One commenter claims that OS X can achieve a real-time latency as low as one millisecond (CoreAudio) while Linux and Win2k can get no better than 200 milliseconds.

Bad reporting is no crime. In fact, some highly respected news outlets thrive on it. While reading this article, it was difficult for me to decide whether the author and editor are guilty of sloppy journalism or, as some of the reader comments claim, FUD. Given the labeling of microkernel enthusiasts and Mac owners as izealotsi, and the use of the word iquainti to describe Appleis choice of Mach, Iim rather inclined to believe the latter.

Being a Unix programmer, I do know that several of my brethren and sistren are intrigued by OS X. They like the idea that the spouse can use Microsoftis office suite but they get to keep their command line; plus they can use iMovie or Photoshop, play some games, and have an attractive, easy-to-use GUI on their desktop. My own belief, and I can only speak for myself, is that certain Linux people are facing the facts that Apple has created a viable Unix desktop for the home user, and they donit like what they see. Given the time and effort, and in some cases emotion, theyive invested in Linux, thatis understandable. As they feel the heat turned up, they will trumpet the things that Linux does better than Darwin, as anyone else would. As such, look for things like iexpensive/proprietary hardwarei, iI can build a Linux box for N dollarsi, and so on. When they start reaching for FUD like this, it may be that they are worried that all their work will go for naught. If this is just the first shot, it could be interesting to watch.

In fact, it is already interesting. Given that Linux Journal is dedicated to Linux, I was surprised to see most of the comments defending OS X (check out the comments at the end of the article). Strange days, indeed.

Richard Burton is a longtime Unix programmer and a handsome brute (check out his TMO series Mac OS X Command Line 101). He spends his spare time yelling at the television during Colts and Pacers games, writing politically incorrect short stories, and trying to shoot the neighboris cat (not really) nesting in his garage. He can be seen running roughshod over the TMO forums under the alias tbone1.

Sign Up for the Newsletter

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday.

No Comments

Log-in to comment