Apple’s Changes to UNIX Can Infuriate, Mystify, Delight

| Hidden Dimensions

"If you have always done it that way, it is probably wrong."

-- Charles Kettering

As every Mac OS X user knows, the early UNIX OSes were never designed to be used by casual consumers. Apple miraculously changed all that, but along the way, major changes had to be made to the UNIX internals. That infuriates or mystifies some UNIX greybeards and IT managers. As a result, Mac OS X must be studied, like any new technology, to avoid frustration.

While attempts have been made on the Linux side, throughout its history, to make it more friendly, those changes have remained cosmetic rather than fundamental. For example, user GUIs like CDE, KDE, and Gnome (and the Nautilus file manager) have tried to emulate the Mac and Windows way of presenting the system to the user.

However, the fundamentals on Linux haven't changed much, and that's because Linux has found its niche in the enterprise where sysadmins like continuity and predictability. Also, the business model of Linux, small, incremental contributions from individuals, precludes the kind of overarching vision that Apple's money and organization can provide.

If it Works, Don't Fix it

I have written before about Apple's philosophy when it came time to ship Mac OS X 10.0, Cheetah, back in March of 2001. Apple was eager to get a new OS out the door, and it was essential to focus on the highest priority tasks and not tinker with what functioned well. In the case of Mac OS X, Netinfo and the basics of the BSD 4.4 Unix worked in the NeXT OS. What remained important and delicate was to remove Display Postscript so that Apple's legacy QuickDraw could be embedded in a new, modern 2-D drawing system, Quartz.

That allowed Apple to achieve the critical migration, via Classic, from embedded Mac OS 9 to modern Carbon and Cocoa apps. That's one example of focusing on the essentials and leaving well enough alone for all the UNIX stuff that "just works."

Moving Forward

It's one thing to get a new OS shipped. It's quite another to be acutely aware of its limitations for the future. Apple was mindful of the things that had to be changed to make its OS totally friendly and reliable for the consumer, secure and enabled for future technologies.

I don't have space here to get into the essentials of the migration from things like /etc/rc.d way of launching daemons to Apple's launchd and System Starter. Briefly, that was done for system reliability and flexibility. When a UNIX server won't boot because someone messed with an rc.d file, a call to the UNIX sysadmin is in order. That won't do for consumers, so a whole new way of booting the OS and launching daemons was required.

Here's a brief, non-exhaustive list of some of the changes Apple has made, along the way, to the UNIX it started with.

  • System Starter and launchd replace cron, init.d, xinetd, mach_init (10.4)
  • Open Directory replaces Netinfo; UNIX useradd replaced by dscl commands. lookupd gone. (10.5)
  • IPFW2 firewall supplanted by Apple firewall that ties apps to ports (10.5)
  • Mac OS X app packages replace single binaries with their boatloads of support files. (10.0)
  • Concept of bundled, precompiled binary packages that carries over from legacy Mac in contrast to Linux tar files that need to be unraveled then compiled for each version of Linux. As a result, no real need for a Package Manager, like Redhat's RPM. (10.0) [However, OS X does maintain package receipts.]
  • HFS+ metadata for Spotlight searches. (10.4) [A file system enhancement, but I'll include it anyway.]
  • Bonjour (Zero-configuration networking)

The point of this is that Mac OS X is an evolving system that still maintains its open source heritage in the Unix fundamentals. For example, Mandatory Access Control, taken from TrustedBSD, enables application sandboxing today, a security enhancement.

The IT Manager's Dilemma

IT managers, these days, are more and more aware of Apple's success thanks to Apple's retail stores springing up everywhere, the Mac's reputation for security and the iPod and the iPhone. They're all contributing to a halo effect that creates a newfound curiosity about Mac OS X. (Despite the fact, I must add, that a remaining percentage of PC/Windows enthusiasts still don't know that Mac OS X/Darwin* is currently, primarily based on FreeBSD UNIX.)

As a result, when a senior manager tells a young engineer (who is Linux savvy) to go study Mac OS X and prepare for a trial, limited roll out, all of a sudden eight years of changes must be confronted. Appealing to the internal Solaris or Linux greybeards doesn't help. Their reaction can sometimes be characterized as, "Omigod -- this is a UNIX from another planet! I don't understand anything Apple has done."

Unfortunately, bewilderment can often turn to frustration and derision. That's why it's not easy for organizations without Apple and Mac OS X legacy experience to just jump in and take advantage of the more modern UNIX that Apple has created.

Remedies

There are many resources available to IT managers who find themselves in the above condition.  The trick is knowing where to start:

Get key personnel involved with Apple's Developer Program and send them to Apple's Worldwide Developer Conference (WWDC) each summer -- for the foreseeable future, not just once.

Go to the definitive sources that explain Apple's changes in Mac OS X. For example, "Mac OS X Internals" and "Mac OS X for Unix Geeks." Regretably, the excellent "Mac OS X Unleashed" series terminated with Tiger.

Get training from Apple specialists who already know the internals of Mac OS X. In addition, Ryan Fass at Computerworld has written extensively of deployment of Mac OS X in the enterprise.

Learn about Mac OS X sysadmin tools in Mac OS X Server. For example, Apple Remote Desktop.

Schedule, with the help of the local Apple sales representative, an executive briefing in Cupertino, CA or selected major cities, to brief senior management on the key technologies that Apple has implemented in Mac OS X that make it different from and better than Linux -- and why.

Subscribe to one of Apple's list server groups at lists.apple.com. Apple engineers monitor those groups and often provide assistance. Fed-talk, Unix-porting and Scitech are useful forums.

Become familiar with MacResearch.org and MacEnterprise.org.

In the past, attending Macworld's IT Track conferences has been a great way to meet IT professionals, many of whom are responsible for installations with thousands of Macs.

The OS From Mars?

Mac OS X isn't the alien UNIX from another planet. It's a state of the art, major contribution to the UNIX technology by a large, well funded, and very competent UNIX vendor, Apple. With anything valuable, however, there's an associated learning curve. Patience, curiosity and scholarship are called for.


The teaser image is "Hexley," the official Darwin Mascot.

* Darwin is the core UNIX, FreeBSD, evolved from 4.4BSD + changes contributed by Apple. Darwin plus Apple's proprietary GUIs and additional features constitute Mac OS X.

Comments

peter

... and Mac OS X is POSIX-compliant as of 10.5.

That’s quite an achievement too.

Gareth Harris

Hello again, John,

I have been using UNIX since sometime in the early 70’s, writing UNIX clones for other manufacturers and companies I founded. Having said that, I am really enjoying and using what Apple is doing.

Here’s why: I am still in computing to get work and research done, NOT to tinker with my work platform most of my time. For example, using mainly Apple’s platform & tools I have replaced a 40 man-year [windows based] database project by myself in 2 or 3 months. This is not unusual. Other projects in factories or warehouses scaled similarly.

IMHO, we have in Apple an advanced UNIX with matching hardware that SOMEBODY ELSE TAKES CARE OF and we can JUST USE IT and get TONS OF WORK DONE.

I can make this decision.

deasys

Apple is, by far, the largest Unix vendor in the world.

jlalguire

Mac OS X has been POSIX compliant since before 10.5. With 10.5 it became a full Version of UNIX, compliant with the SUSv3 (Single UNIX Specification) standard. So with 10.5 Mac OS X is no longer UNIX-like or UNIX-based, it is an open brand of UNIX.

Fairly

“Apple is, by far, the largest Unix vendor in the world.”

That can be argued. What can’t be argued is that they’re the biggest suppler of their own operating system.

Fairly

Another thing that intrigues me about this piece. It seems to take the perspective that changes to a common body of system code that are exclusively oriented towards “the rest of us” are good for the Unix community as a whole.

They are not. Professional admins laugh at Apple. Apple long ago said they have no interest in pursuing sales in the enterprise sector. That is simply a fact.

And you John Martellaro want to say this is good for the community at large? Ludicrous. You’re drinking too much of that potion made by the alchemists in the RDF.

What are you a scientist of anyway?

Steve K

?Apple is, by far, the largest Unix vendor in the world.?

“That can be argued. What can?t be argued is that they?re the biggest suppler of their own operating system.”

Bollocks! No other Unix vendor comes even remotely close to selling as many licenses as Apple.

Even if you’re charitable and extend the definition of Unix to include free work-alikes like Linux, the number of copies of OS X shipped would easily be more than double that of all the other vendors combined.

I challenge you to name another Unix vendor, official or otherwise that has anything like the installed-base or number of copies shipped that Apple has.

Log-in to comment