Should Apple switch Mac OS X from Mach to Linux kernel?

“We live in a three OS, two hardware platform world, but that’s going to start changing in 2006. Apple will begin migrating Macs to Intel CPUs, and the new ‘Macintel’ computers will be able to run Windows, Linux x86, and Mac OS X,” Dan Knight writes for Low End Mac. “Windows does a lot of things right, but the underlying operating system is so full of holes it makes Swiss cheese look solid. Linux does a lot of things right, but there are still those geeky things that require you to use the terminal.”

“Mac OS X does almost everything right. It’s so secure that not a single virus has survived in the wild. Every program written for OS X (as opposed to ported from Linux or Unix) installs easily. The underlying kernel [Mach] is a bit of a hack, ported from NeXT’s x86-based OS to the PowerPC, and moving the Mac to Intel CPUs will improve things,” Knight writes. “The question is how the future will play out. Linux is already broken into many camps – KDE aficionados vs. Gnome users, Debian vs. Slackware vs. Gentoo plus dozens of other distributions. But the core of Linux is solid, powerful, efficient, and doesn’t get as bogged down with multithreading as the Mac OS. In many ways, OS X is what Linux would be with a great GUI. Likewise, Linux is in some ways what OS X could be. For all its strengths, OS X does allow tasks to so dominate the OS that everything else stops while the beach ball spins.”

Knight writes, “NeXT already learned how to put their interface on both Mach and Solaris kernels. Linux has grown into the most popular non-Microsoft operating system on x86 hardware, but it’s held back by dozens of distributions and two different GUIs. What if Apple were to build the equivalent of OpenStep for Linux? That is, take the whole of OS X and build it around a Linux kernel instead of Mach… We can dream, can’t we? Dreams of the best kernel and the best GUI working together. An OS and installers that are truly ready for the masses. No more beach balls of death. Real competition for Microsoft Windows present and future. The transition to Intel would be the perfect time to make the switch.”

Full article, an excellent read, here.

Advertisements:
• The New iPod with Video. The ultimate music & video experience on the go. From $299. Free shipping.
• Connect iPod to your television set with the iPod AV Cable. Just $19.00.
• The New iMac G5. Built-in camera and remote control. From $1299. Free shipping.
• Apple USB Modem. Easily connect to the Internet using your dial-up service. $49.00.

40 Comments

  1. The main reason here is that Apple most likely don’t want to get tangled up with the GPL. BSD license of BSD Unixes makes it easier for companies to take what they want and use it as they please. the GPLed nature of Linux opens up a whole can of worms when it comes to inserting propertary code into the kernel.

    I’m sure even if there are good techinical reasons for using Linux, Apple Legal would say no. Managing and avoiding GPL violations would just be too difficult.

  2. Unless there’s a clear advantage, why? The Linux kernel is already pretty bloated in order to support the thousands of hardware combinations that exist in the x86 world. I don’t think that matches well to the limited hardware that Apple produces today. Besides, the BSD’s are still tops for security in the *NIX world.

    If we would see Apple change to a Linux kernel, I would suspect that would be a precursor to allowing OS X run on any x86 commodity hardware.

  3. The Linux kernal is now under GPL – the most restrictive source license in the world. The Mach/BSD kernals are covered by a much more free license which will allow Apple to make proprietary additions should the ever need to (they have not had the need to date). The only reason for wanting to do such a thing would be to provide Linux Binary execution capability. Given the linux’s world’s general disgust for commercial software, there is little that can’t be found in source form.

    I think the license alone is enough to make the switch a bad idea. If would be better for Apple to work more closely with the BSD people (who have added the ability to run linux binaries) and push open source acceptance of the BSD kernal instead of linux. The BSD license is much more friendly to those who want to contribute to the open source community without giving away the store.

  4. Darwin, the unix core of OS X, is open source. To my way of thinking, that leaves it available to the open source community to improve. Hopefully Apple will then adopt the best of those improvements for the “official” release.

    Linux & unix are closely related. The various unix kernels and other low level software can borrow ideas from Linux, as they were ideas from computer scientists befor Linux used them in their implemetation. By investigating the software patent claims and not using Linux code, Apple should be able to avoid both patent and GPL entaglements.

  5. If you want to run Linux on your OS X box just look up Yellow Dog Linux and click on BUY. For Apple to redirect some of its software engineers on a kernel switch would be a waste of time. Even if it could be done smoothly, Apple OS development would then be hostage to Linus Torvald’s occasional bike rides down from the mountain to announce newer kernels.

  6. Hello? Abandon the Mach kernel? I don’t think so.

    Who helped developed Mach at Carnegie-Mellon? Avie Tevanian, formerly of NeXT, Chief Software Technology Officer at Apple.

    http://en.wikipedia.org/wiki/Mach_kernel

    Lead developer of Mach was Richard Rashid who eventually went to Microsoft.

    Apple’s hybrid of BSD, Mach, and odd-looking GUI, provides a great combination of performance, stability, dependability, security, and useability that exceeds all efforts from Linux distros and Microsoft.

    A Linux kernel is probably not in the future at Apple for Mac OS X.

    Now, back to that GUI. Apple’s been taking some heat because the OS X Tiger GUI (and various Apple applications for OS X) don’t even adhere to Apple’s own GUI guidelines. The GUI is sorta all over the place and not consistent.

    Why?

    I have a theory. Microsoft. Windows. Vista.

    Steve Jobs knows, and we’ve seen it already, that Microsoft will copy everything they can from Mac OS X and plug it in to the next version of Windows. Steve can’t stop Microsoft from stealing from Apple.

    However, Apple is giving Microsoft a moving target interface which stops moving with Leopard’s introduction AFTER Windows Vista ships at the end of 2006. With Leopard, gone will be the confusing look and feel of platinum, brushed aluminum, window panes, pop out panes, and ancient Finder. Why? Because Microsoft will have copied all they can by then, and the introduction of Leopard in early 2007 ups the ante. Again.

    Tera Patricks
    Mac360

  7. One of the biggest things that has hurt the advancement of the Mac OS X platform is the endless list of hoops that the developer community has had to jump through. In less than 5 years Apple has launched OS X and went through everything up to our current version and scaled from G3-G4-G5 and now Intel x86 processors. That has made the developer’s job more than a little difficult. It has also probably kept more than a few commercial companies out of the market.

    The last thing the Mac universe needs is another radical shift & going over to the LINUX kernel is not the answer.

  8. >. UNIX is much more powerful than its little step-child linux. UNIX can do anything and everything better than linux. Linux is just a UNIX rip-off.

    I’d be interested to see some evidence for this rather bold statement. It also makes me wonder why Sun has recently had to start supplying Linux in addition to its own Solaris, and why IBM is investing seriously in Linux. You’d have thought Sun and IBM would know a thing or two about UNIX?

  9. Nice to hear from Tera Patricks on this issue – when I see her name I always know there will be something valuable worth reading.

    As to which kernal to use, seems to me Apple is really starting to shine right now, why switch at this point. Course, I’ve been wrong before…

  10. Aside from the kernal liscensing issues, which do favor BSD Unix, there are other reasons why going to Linux would be problematic.

    First, there are many differences between these kernels, and that would require changes to be made to almost every Mac application. PPC to x86 has been relatively smooth, thanks to universal binaries, but it’s still projected to take years to get everything settled. That would look like a hiccup in comparison to changing the kernel.

    Second: “… the core of Linux is solid, powerful, efficient, and doesn’t get as bogged down with multithreading as the Mac OS.” Yeah, but the problem here isn’t BSD – it’s the OSX GUI overlaying it. For reasons known only to the NeXT alumni, the OSX layer doesn’t utilize all the threads that BSD has available. It’s the same reason why OSX server sucks so bad under load, like having more than a dozen users try to utilize it at the same time. Apple needs to address this, otherwise the choice of kernel will be irrelevant to increasing performance.

    Last, as someone mentiioned, Apple has control over the BSD kernel – they can and have changed it under OSX (though not always for the better, if you read what the NIX geeks have to say). Linux is controlled by Linus Torvalds – a mercurial, headstrong, brilliant guy, who doesn’t suffer fools gladly. Remind you of anyone? I have no faith that His Steveness and Linus could ever coexist in the same OS universe.

    Sticking with BSD is fine for now. Jobs just needs to do something about optimizing OSX to better leverage it’s power. Once that’s done, and if OSX/BSD still comes up short, then moving to a new kernel should be a topic for serious discussion. Until then, it’s dreaming via pipe.

    MDN magic word: “quality”
    As in, the OSX overlay needs to improve it’s quality first, before worrying about anything else (how eerie is that)
    ” width=”19″ height=”19″ alt=”cool smirk” style=”border:0;” />

  11. Err… Mac OS X doesn’t use the Mach kernel any more. It uses XNU, which is related, but is not plain Mach.

    This Dan Knight geezer is a joker who is clearly a second rate journalist with no real technical knowledge. The Linux kernel is a bloated heap of crap which big development issues. It might have a lot of people working on it, but it has some fundamental architectural problems.

    This talk about kernels being written for particular processors is crap too. Linux and XNU have both been written to be portable across multiple processor architectures.

    There’s no way in hell Apple are going to dump XNU for Linux – it wouldn’t make senses. Besides, it would be as significant a transition to accomplish than moving from PowerPC to Intel.

  12. In general: the GPL license is very restrictive. That’s the major reason for not switching. Apple would not, could not own any of their own code. Period. FreeBSD does not operate under that stricture. Why would any for profit company handcuff themselves in this way? (not to mention Jobs’ and Tevanian’s history with the FreeBSD)

    qka: the kernal is open source. And it is constantly being improved… most assuredly without Apple’s help. New versions seem to be released faster than prior to Apple’s use of it’s kernal. Considering that FreeBSD was on version (approximately) 3.8 or 4 when OS X was initially released and is now on version 6.0. Apple has seemed to reinvigorate the FreeBSD open source community through it’s acceptance. That is a good thing and will continue.

    iDont: full blown unix is more powerful. But Linux is no more the red haired step child of Big Iron ‘Nix than any of the BSDs. Both were created to put Unix on the minicomputer (user desktops). Both have their place.
    I have used both. I prefer FreeBSD. But that doesn’t mean (unlike Windoze) that Linux does not have a place in the market. It does. A huge one. And unless you are going to start using $6m CMOS iron you really can’t do much better than the BSDs or Linux. Linux has a huge community developing and supporting it. BSDs is much smaller but just as effective.

    Tera: Making the GUI undesirable for inclusion in Vista does not c:\ompute. The brushed metal interface items have been around for quite awhile. If M$ wanted it they would have it by now. Not hard to do. And no one has to explain to them how to f*sck up an interface. They’ve been doing it since Windoze 1.0. No this is just Apple trying to figure out where to go with the UI. Nothing more, nothing less. One day they will probably settle on a unified look and feel. It just goes to show you that they aren’t as perfect, under budget and ahead of schedule as we are lead to believe. But it still is by far the best OS for everday computing that we have.

  13. One more thing. Spinning beachballs are not the province of kernal. They are part and parcel of the GUI’s ineffeciant use of the kernal’s threads. Actually they don’t use all the threads available. I have never had this problem running FreeBSD on a laptop. Apple should have fixed this with their very first update yet it goes on. And their server problems relate directly to this. Cure this problem and they will have removed a large obstacle to enterprise adoption.

  14. I have read with great interest all the commnets regarding any switch of OSXs core. My former firm developed telecom code in Linux. Liux is great for what it does. As a consumer OS it is severely lacking.

    OSXs beggest drawback is the poor way it handles multi-threading, but as poointed out above that is an OSX GUI issue, not a core issue.

    If you look at what Apple undertook, switching from OS9 to OSX, and keeping the flow of apps coming from developers, I don’t see how they could have done any better. Apple has matured OSX extremely well, at the same time they have had to deal with multiple processor upgrades and multiple processor vendors.

    Switching to Intel will simplify OSX development. As for weaknesses in OSX Server, I say, so what? OSX Server is not meant to serve large groups. It is targeted to Mac users, which are typically smaller firms. Not the 30 or 40, or more employees that WinNT, or UNIX/Linux, supports.

    When Apple sees the time is right to address larger networks, I’m confident resources will be allocated to address any multithreading issues that need be.

    Bottom line: LInux core? No.

  15. No, please gawd no not another transition!

    Darwin is a great foundation. They’ve spent 5 years running OS X on Intel in the lab. Unless there’s some huge investment in Plan C (run OS 11 on Linux on Intel), I’d vote for “forget it”. Apple will have their hands full managing the transition over the next two years. If the GUI were wrapped around OS/2, there would be a case for this…

  16. Oh gawd NOOOOOOOOOOOOOOOOO!!!!!!!

    If I never *bleeping* have to deal with kernel issues again on a Linux box I’ll be a happy man.

    Nothing is wrong with the microkernel architecture. Linus doesn’t like it, so legions of LinuxFanboyz proclaim it the Anti-Unix.

    For one thing it would make hardware installs and upgrades a horror, because for many of them *you have to recompile the <bleeeeep bleep bleeep> kernel to get it working. On OS X you just install a kext.

    There’s a reason OS X works on the desktop and Linux suxrox. (and anyone who says differently is either a masochist, or hasn’t actually *used* a Mac, they just know from fellow fanboyz that Macs cost like $10,000 man….)

  17. Won’t pretend to know too much (or enough) about what’s going on here (Linux versus Unix, I guess), but my take is that it would require a shift like OS9 to OSX, which many people still have not undertaken. You’d have an OSX Classic emulation mode (if you were lucky), or you’d have to drop all your old software and start over.

    If I’m wrong, say so.

    If I’m right, I wouldn’t expect such a move unless the potential gains were truly significant. Probably not before the OS “goes to Eleven” (with a bow to Spinal Tap).

  18. “Because, UNIX is the original!!! Linux ain’t done a dat gum thing that UNIX (the original) can’t do. Linux is just another flavor of UNIX. Nuff said.”

    I’m used to Windows Fanboys on this site, but UNIX fanboys? Extremely odd!

    As much as I’m a fan Solaris, AIX and other UNIXs. Linux does everything they do and more.

    Mac OS X is far less “UNIX”y than Linux is BTW, despite Apple posting the word “UNIX” in large letters on their website.

  19. xan, go to the Apple web site, enter ‘mach’ in the search box and press enter.

    What you get is a link:

    http://www.apple.com/macosx/features/unix/

    “The most widely-sold UNIX-based operating system, Mac OS X offers a unique combination of technical elements to the discerning geek, such as fine-grained multithreading, Mach 3.0 microkernel, FreeBSD services, tight hardware integration and SMP-safe drivers, as well as zero configuration networking. Tiger’s state-of-the-art kernel features improved SMP scalability and 64-bit virtual memory, while standards-based access control lists take UNIX permissions to the next level.”

    That looks to me as though Apple calls the OS X kernel ‘Mach’ though they have taken creative license with Mach and FreeBSD.

    From Wikipedia:

    “XNU is the name of the kernel that Apple developed for use in the Mac OS X operating system and released as open source as part of the Darwin operating system. It is a hybrid kernel combining the Mach kernel developed at Carnegie Mellon University with components from the FreeBSD kernel. XNU is an acronym for X is Not Unix.[1]
    The primitives and fundamental services of the XNU kernel are based on Mach 3.0. Apple modified and extended Mach to meet the functional and performance goals of Mac OS X. Mach 3.0 was originally conceived as a simple, extensible microkernel. As such, it is able to run the core of an operating system as a separated process, which allows a great flexibility (one could run several operating systems in parallel above the Mach core), but this reduces performance because of the translations between Mach and the different codebases. With Mac OS X, since the behavior of the system is known in advance, BSD functionalities were built into the core with Mach. The result is a combination of the assets of Mach and BSD. The Mach side of the kernel is responsible for the memory management, inter-process communication and the input/output system. It also allows protected memory, pre-emptive multitasking and advanced virtual memory. The BSD side of the kernel manages users and the permissions, contains the network stack, offers a virtual file system and maintains POSIX compatibility.”

    A good journalist does a little research first.

    We can debate all day about the advantages or disadvantages of one kernel over the other. In the end, not much will change. Linux will remain a very good server OS that’s difficult to use and crummy on the desktop. OS X will remain an excellent desktop OS, with gazillions of great applications, that makes using a computer enjoyable at nearly every level. Including, da da, a server.

    Tera Patricks
    Mac360

  20. “real IT guy” says lots about <beep> <beep> kernel compiles and upgrades but having worked with and on Linux since the 2.0 days I have to wonder just what kind of distribution did he use that caused all of his troubles.

    Hardware upgrades require no kernel recompiles, unless you’re not using modules. If that’s the case then you’re compiling your own kernel as it is.

    No, the underlying performance concerns are reflected in the anantech articles comparing mysql and apache performance between OSX and Yellow Dog Linux. Why does YDL handle so incredibly much more? What part of the GUI is slowing down database and web server handling? Or is it more than the GUI that’s slowing things down?

  21. All the Linux guys have Unix-envy, which is why this silly suggestion of MacOS X adopting Linux keeps surfacing. It’s their wet dream.

    The truth is that Linux is the Windoze of the Unix universe. It is the least secure, most bug ridden Unix-like OS. Tux sux.

    I also have to think that Mach is better suited for a multi-processor world. It wouldn’t surprise me if by 2007 most Mac’s will sport a minimum of two processor cores.

  22. My opinion is; linux on mac only because it will have an “intel inside” is not an advantage to start buying mac.
    I do not use intel, and as for OS’es; Unix was, Windows & MacOS are, but linux and those like it are the future without question.

    The GPL is not a problem when seen with the correct light. If proprietary ideas are the mainstream, then no, the GPL is not for you; the success of the idea of the GPL is that all using, gain the same, and give back to. Too simple ?, maybe, but the best ideas are, and last longer too. The PC was just such an idea that allowed others to build upon it, that still others were able to use it, too.

  23. Changing kernels is probably not a brilliant idea, but there are problems with OSX that Apple needs to address. The result of Anandtech’s comparison at http://www.anandtech.com/mac/showdoc.aspx?i=2436&p=8 of OSX and Linux showed this:

    “Mac OS X is incredibly slow, between 2 and 5(!) times slower, in creating new threads, as it doesn’t use kernel threads, and has to go through extra layers (wrappers). No need to continue our search: the G5 might not be the fastest integer CPU on earth – its database performance is completely crippled by an asthmatic operating system that needs up to 5 times more time to handle and create threads.”

    Anandtech performed exhaustive tests before coming to the conclusion noted. Their statement isn’t conjecture or opinion; it’s fact. As a Mac user I want the best computing experience all around and that includes speed. Hopefully Apple will look at these results and fix the problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.