Beginners Start Here: What’s so good about Unix, anyway?

Sean McNamara
29 January, 2009
View more articles fromthe author
AAA
Help

In an earlier piece I wrote about Mac OS X’s Unix foundations which talked more about how that Unix underbelly is obfuscated rather than what made that foundation worthwhile. This time, we’re going to examine that underbelly a little bit more to understand why Apple chose Unix as the foundation to Mac OS X.

I spoke in my prior piece about Mac OS X’s handling of multiple users – those of us who remember Mac OS 9 may remember the kludge that Apple implemented for multiple users. It was a kludge because, at heart, Mac OS 9 and all its predecessors (what I’ll call the Classic Mac OS) were single user operating systems.

When Apple implemented Unix as the foundation of Mac OS X (a foundation Mac OS X inherits from its predecessor, NeXTSTEP), it made the new operating system multi-user capable from the ground up, as Unix had had that feature for many years. But this wasn’t the main reason Apple made this architectural change, there were other, more important considerations.

The first of these was stability: in the Classic Mac OS, if one program crashed, it was likely to bring down the whole machine. This was possible because the Classic Mac OS didn’t use “protected memory”, where each program was forbidden to write to the memory space of other programs. Often, when experiencing a problem, a faulty program would write spurious data to the OS’s memory space, causing the whole machine to crash. Mac OS X introduced protected memory, and these sort of “whole-machine” crashes are, thankfully, a lot rarer than they used to be.

Another feature of the Classic Mac OS was multitasking, where more than one program could run at a time. Once again, this was an add-on to the OS, and the type of multitasking used was called “co-operative multitasking”, where the OS relied on the good graces of the application (or, more accurately, the programmer) to give up slices of processing time to allow other applications to process things at the same time. To say some applications were processor hogs is an understatement, so Apple was happy that Mac OS X’s Unix foundation used preemptive multitasking, in which the OS takes on the role of traffic cop, ensuring a fair distribution of processor time according to each application’s needs. This makes for an overall more smooth experience for the user when multiple applications are vying for processor resources.

Yet another tacked on feature of the Classic Mac OS was virtual memory, where space on the hard drive could simulate RAM to allow more programs to run. HDs are slower than RAM, so this had a performance hit, and the level of virtual memory had to be manually set. Unix brought to Mac OS X advanced memory management – the OS adjusts the amount of virtual memory on the fly according to the needs of applications, and applications can request extra memory as they need it (and release when they don’t). This means the performance hit is only ever as small as it needs to be, while maintaining flexibility for the user about how many applications they might want to be running at any one time.

Lastly, and perhaps most invisibly for the user, was the multi-processing support Unix brought to the Mac OS. There have been a few multi-processor Macs over the years, but the operating system support for these multiple processors has been pretty bad. Ultimately, it was up to the application programmers to modify their applications (or make plug-ins) to utilise the extra processors. Mac OS X has built-in support for multiple processors, and performs another traffic cop role in distributing the workload between them. Now that Apple is manufacturing machines based on Intel’s multi-core chips, this feature is finally one most users are getting benefit from.

For most users of Unix operating systems (or “Unix-like” ones, such as Linux), a graphical user interface is provided through the X-Window system, which can be themed to look very different and have different feature sets. This makes for quite a hodge-podge of experiences for users, but Apple brought its expertise in user interface design to Mac OS X, overlaying it with a well-designed, attractive and consistent graphical user interface. Without getting into a debate about whether Mac OS X is “better” than other Unixes, I’ll just say that for my money, as a supporter of computer users, Mac OS X provides a very user-friendly way of using a Unix operating system while maintaining the benefits that foundation brings.

Leave a Comment

Please keep your comments friendly on the topic.

Contact us