What Is Darwin (and How It Powers Mac OS X)

Darwin is the Unix-derived core that provides the underlying foundation for Mac OS X. At Darwin's heart is the XNU kernel--a Mach 3.0-based microkernel that has been modified to include portions of FreeBSD for performance reasons. Darwin includes facilities for creating device drivers, supports multiple file systems through its enhanced Virtual File System (VFS) design, and offers premier networking facilities such as Bonjour, an implementation of zero-configuration networking. Apple releases Darwin under the Apple Public Source License (APSL) 2.0, and organizations such as OpenDarwin.org and GNU-Darwin use this source to periodically release their own custom versions of Darwin in an effort to foster community involvement.

In this article:

Since the introduction of Mac OS X, its Objective-C-based Cocoa frameworks have allowed developers to produce some amazing software at an incredible pace. All of the resulting innovation in the marketplace has made it pretty easy for us to stay captivated on the desktop and forget all about the engineering marvel that makes all of this possible. Let's take a trip down into the core of OS X--Darwin--to learn more about the foundation that gives us one of the best user experiences in computing.

Darwin's Evolution

Mac OS X development started shortly after Apple's acquisition of NeXT all the way back in 1996. After the buyout, development on what would evolve into Mac OS X was code-named Rhapsody until Mac OS X was officially released in 2001.

Sometime during Rhapsody's development, its code was forked and open sourced into what we know as Darwin. By April 2000, Apple's team had already completed their version 1.0 build. Although they'd been releasing the Darwin source prior to that time, the version 1.0 build was especially significant because it was based on a new hybrid core that we now know as the XNU kernel. Like the Free Software Foundation's recursive acronym GNU, XNU stands for "XNU is Not Unix."

A Quick Overview of the OS X Architecture

Now that you know a bit about Darwin's past, let's take a moment to look at where it fits into the overall OS X architecture before diving off into the details. Generally speaking, most of Darwin fits into what's called the Core OS, which sits directly on top of the hardware and comprises the kernel, device drivers, and other low-level resources of the OS. Other layers, including core services, application services, graphics, and multimedia, sit between the Core OS and the user experience that is defined by Aqua: the standard that defines the overall appearance and behavior of Mac OS X apps. For some good reading on all of the ins and outs of how all of the OS X technology fits together, check out the Mac OS X Technology Overview. It's a good way to spend a rainy day.

Two different views of the OS X System Architecture. Most of the technologies in the "Core OS" are part of Darwin.