What is Mac OS X?

© Amit Singh. All Rights Reserved. Written in December 2003

Architecture of Mac OS X

This page briefly describes the architecture of Mac OS X and the Mac's firmware. Description of an operating system in reasonable detail would take up one or more books, which this page is not. Consider it as a high-level description of some low-level details, if you will.

As mentioned in A Brief History of Mac OS X, Mac OS X is a descendent of NEXTSTEP. We shall not point out any further similarities or differences between Mac OS X and these earlier systems.

Darwin

The first version of Darwin, 0.1, was released on March 16, 1999 as a fork of a developer release of Rhapsody. Although Darwin is an operating system in itself, it can be best understood as a collection of technologies that have been integrated by Apple to form a major, central part of Mac OS X. Critical application environments of Mac OS X, such as Cocoa and Carbon, are not part of Darwin. So isn't Aqua, the overall GUI of Mac OS X (including the Windowing System), and several other components.

Contents

Darwin 7.0.x (corresponding to Mac OS X 10.3.x) consists of over 250 packages. Many of these are Apple packages (including the Mac OS X kernel and various drivers), while the others originate from *BSD, GNU, etc. Apple has leveraged a lot of existing open source software by integrating it well (usually) with their system: apache, bind, binutils, cvs, gcc, gdb, gimp_print, kerberos, mysql, openssh, openssl, pam, perl, postfix, ppp, python, rsync, samba, and many more BSD/GNU/other packages ... are all part of Darwin. In many cases, Apple has made important modifications to open source code to optimize/adapt it to their platform (consider gcc and gdb). Moreover, even though one can always configure and control such software "as usual" (editing their configuration file in vi or emacs, say), Apple provides simplified user interfaces that work well for at least the not-so-contrived cases.

An indicator of how well Apple has made use of existing open source software is the large number of sources Darwin draws from: *BSD, GNU, Mach, ... and even Linux. /usr/sbin/pcsd is a daemon used to dynamically allocate/deallocate Smart Card reader drivers at runtime and manage connection to the readers. This, and related tools, are taken from the MUSCLE (Movement for the Use of Smart Cards in a Linux Environment) Project. The much advertised "Secure Trash Deletion" is a simple adaptation of the open source srm utility (it has been extended to support named forks, for example). Such eclecticism in ingesting technology from various sources and wrapping/integrating it to create a uniform effect is one of the great strengths of Mac OS X.

Portability

Darwin runs on the PowerPC and x86 platforms. What's more, it is even possible to build a "fat" kernel, containing both platform executables in a single file.

Licensing

Darwin packages that are originally from Apple are usually covered under the Apple Public Source License (APSL). The current version (2.0) of APSL qualifies as a free software license, although it is not compatible with the GPL. The Free Software Foundation offers its views on APSL on their web site.

The GNU-Darwin Project aims to leverage the combination of Darwin and GNU. OpenDarwin is an Apple co-founded effort for fostering cooperative Darwin development. You can download bootable Darwin CD images for both the PowerPC and x86 platforms from these projects' web sites.

Layers

The pieces of software that constitute Mac OS X can be grouped into logical layers as shown below:

Mac OS X: Architecture

Firmware

The Mac firmware and the Mac OS X bootloader are described in the section Booting Mac OS X.

XNU: The Kernel

XNU, the Mac OS X kernel, is described in XNU: The Kernel. The kernel and its extensions make up the Kernel Environment, the lowest (most fundamental) layer of Mac OS X (the firmware and the bootloader are not technically parts of Mac OS X).

Higher Level Services and Environments

Still higher layers of Mac OS X are described in the section Above the Kernel.

Higher Level System Startup

Mac OS X System Startup describes the user-level sequence of events that happen when Mac OS X boots.

<<< A Brief History of Mac OS X main Booting Mac OS X >>>