Zum Inhalt springen

The macOS Lineage: From NeXTSTEP to Darwin

Zusammenfassung

macOS is not the operating system Apple built. It is the operating system Apple bought — from Steve Jobs’s company NeXT, in an acquisition that ended Jobs’s exile and began Apple’s second era. The NeXTSTEP operating system that Jobs had built after leaving Apple in 1985 was technically superior to anything Apple had developed internally: a Mach microkernel, a BSD Unix userland, an Objective-C runtime, and an application framework (AppKit) that made building sophisticated software dramatically faster than the toolkits of the era. Apple’s purchase of NeXT in 1997 for $429 million brought all of it to Cupertino. The path from NeXTSTEP to macOS X to the iPhone’s iOS reveals how a single coherent design decision — Unix underneath, polished GUI on top — produced the dominant consumer operating systems of the early 21st century.

The Pre-OS X Crisis: Classic Mac OS and Its Limits

Apple’s original operating system — Classic Mac OS, running from 1984 through Mac OS 9 (1999) — was built for a world that no longer existed by the mid-1990s. Its architecture reflected the constraints of a 1984 Macintosh: 128 KB of RAM, a single-tasking environment, cooperative multitasking added as an afterthought in System 6, and a design that assumed most programs would run alone.

By the mid-1990s, Classic Mac OS’s weaknesses were critical:

No protected memory: any program could write to any memory address, including the operating system’s own data. A crashing application could crash the entire system. “Bomb” icons and forced restarts were routine.

No preemptive multitasking: the system relied on applications voluntarily yielding the processor. An application that entered a loop and forgot to yield froze the entire computer.

No proper device driver model: hardware support required kernel-level code from third-party developers, with no isolation between driver failures and system stability.

Apple attempted to replace Classic Mac OS with multiple projects throughout the 1990s: Pink (cancelled 1995 after being spun off as Taligent, a joint venture with IBM); Copland (cancelled 1996 after years of development that never produced a stable build); Gershwin (announced as Copland’s successor, cancelled before development began). None succeeded. By late 1996, Apple was on the verge of bankruptcy with no OS replacement in sight.

NeXT: The Operating System Jobs Built in Exile

After Steve Jobs was forced out of Apple in 1985, he founded NeXT Computer to build a workstation for the higher education market. The hardware was striking: a magnesium cube (the NeXTcube) with a high-resolution display and a magneto-optical disk drive. The operating system was technically extraordinary.

NeXTSTEP was built on two foundations:

Mach, a microkernel developed at Carnegie Mellon University by Avie Tevanian and Richard Rashid. The Mach kernel implemented minimal primitives — tasks, threads, ports, messages — that higher-level services were built on top of. Its task and memory management were sophisticated, supporting virtual memory, memory-mapped files, and inter-process communication through well-defined message-passing interfaces.

BSD Unix userland, layered above the Mach kernel. NeXTSTEP’s command line was a full BSD Unix environment: the same tools (ls, grep, vi, cc), the same file system semantics, the same network stack. A Unix programmer arriving at a NeXT workstation found a familiar environment below the GUI surface.

Above these two layers sat AppKit (the application framework) and the Objective-C runtime. AppKit was built on Interface Builder — a graphical application for designing user interfaces by dragging components and connecting them to code — and an object-oriented framework that provided most of the functionality common applications needed: text editing, file dialogs, printing, undo/redo. Writing a NeXT application involved far less boilerplate than writing the equivalent application on any other platform.

Tim Berners-Lee wrote the first web browser and the first web server (for the World Wide Web) on a NeXT workstation in 1990. The NeXT’s development environment made the project feasible in the time Berners-Lee had.

Objective-C on NeXT

Objective-C, the language that Jobs selected for NeXTSTEP development, was designed by Brad Cox and Tom Love at their company Stepstone in 1983. It added Smalltalk-style message-passing to C: instead of calling a function, you sent a message to an object — [button addTarget:self action:@selector(buttonPressed:)]. This model made runtime flexibility (late binding, dynamic dispatch, categories adding methods to existing classes) available in a language that was otherwise standard C. Apple’s developers used Objective-C for all macOS, iOS, and watchOS development until Swift’s introduction in 2014.

The Acquisition and the Transition: Rhapsody to Mac OS X

Apple’s acquisition of NeXT closed in February 1997 for $429 million plus stock. Jobs returned to Apple as an advisor, became interim CEO in September 1997 when Gil Amelio was ousted, and became permanent CEO in 2000.

The transition from NeXTSTEP to a consumer Mac OS was not immediate. The first plan, Rhapsody (announced 1997), was essentially NeXTSTEP with Mac-like styling — it ran Classic Mac applications in a “Blue Box” emulation environment and required developers to rewrite their Mac applications in Cocoa (the NeXT AppKit, renamed). The Mac developer community rejected the requirement to rewrite applications; the Blue Box was seen as permanent relegation rather than migration.

The revised strategy was Carbon: a modernized version of the Classic Mac OS API that could be adapted to run on top of the new Unix core without full rewriting. Carbon gave Classic Mac applications a path to the new OS without requiring Objective-C rewrites. The compromise was uncomfortable — Carbon was an adaptation of a 1984 API onto a 1997 microkernel — but it preserved developer continuity.

Mac OS X 10.0 (Cheetah) shipped in March 2001. The Aqua interface — designed by Apple’s human-interface team (led by Cordell Ratzlaff) under Jobs’s direction — was controversial for its visual density and its rounded, translucent “pinstripe” appearance. Jobs famously told the designer that he “wanted it to look so good you want to lick it.” Beneath Aqua lay Darwin: the open-source Unix core combining the Mach kernel (then at version 3.0) with a FreeBSD-derived userland.

Darwin: The Open-Source Foundation

Darwin, the open-source Unix core of macOS, was released by Apple in 2000. It combined the Mach kernel, BSD Unix components, file system drivers, and device driver framework (I/O Kit) in an open-source release that allowed external contributors and enabled academic research.

Darwin’s release was significant as a statement of architectural philosophy: Apple was not trying to hide that macOS was a Unix. The Terminal application gave developers direct access to a full Unix command line. The BSD subsystem provided POSIX-compliant APIs that allowed Unix software to be ported to macOS with minimal modification. The Homebrew package manager (2009) built an extensive ecosystem of open-source Unix tools installable on macOS. Xcode’s command-line tools included compilers (initially GCC, later LLVM/Clang) that compiled standard C and C++ code.

The LLVM compiler infrastructure — developed initially by Chris Lattner as a University of Illinois research project, then adopted and sponsored by Apple — became the central compiler technology for Darwin, replacing GCC. LLVM’s modular architecture (a reusable compiler IR, separate front-ends for different languages, separate back-ends for different architectures) made it adaptable to new use cases: it became the compiler infrastructure for Rust, Julia, Swift, and dozens of other languages.

iOS: macOS on a Phone

The iPhone (2007) ran a version of macOS. Jobs announced it as “the best version of OS X ever.” The underlying architecture was identical: Mach kernel, BSD userland, Objective-C runtime, Cocoa frameworks adapted for a touchscreen interface. iPhone OS — as it was named with the 2008 iPhone SDK, and renamed iOS in 2010 — shared the Darwin kernel with macOS and built a new UI layer (UIKit, replacing AppKit) atop the same foundations.

The App Store (2008) and the iOS developer ecosystem — which required Objective-C (later Swift) and Apple’s developer tools — created a walled garden built on an open-source Unix foundation. Every iPhone application ultimately ran on BSD code that had been open-source since the 1990s. The applications themselves were proprietary; the kernel underneath was not.

The same Darwin kernel lineage runs macOS, iOS, iPadOS, watchOS, and tvOS. Apple Silicon (the M-series chips from 2020) moved this entire stack from Intel x86 to ARM — a transition that the clean layering of Darwin from hardware made possible in under a year, contrasting with the 2005–2006 PowerPC-to-Intel transition that took two years.


📚 Sources