From NeXTSTEP to macOS
The story of macOS’s Unix foundation begins not at Apple, but at a company Steve Jobs founded after leaving Apple in 1985. NeXT, Inc. created an operating system so advanced that when Apple needed to modernize its aging Mac OS, it acquired the entire company to get it.
The Classic Mac OS Problem
By the mid-1990s, Apple faced a crisis. The original Macintosh operating system, while innovative for its time, lacked fundamental features that modern operating systems required:
- No protected memory: A crash in any application could bring down the entire system
- Cooperative multitasking: Applications had to voluntarily yield CPU time
- No modern networking stack: TCP/IP was bolted on awkwardly
- Limited scalability: The architecture couldn’t evolve to meet future needs
Apple attempted several internal projects to create a modern replacement—Copland, Taligent, Pink—but all failed. By 1996, Apple was searching externally for a solution.
NeXTSTEP: Unix Made Elegant
While Apple struggled, NeXT had been building something remarkable. NeXTSTEP, first released in 1989, was a Unix-based operating system with several distinctive characteristics:
Mach Microkernel Foundation
NeXTSTEP used the Mach microkernel developed at Carnegie Mellon University. Mach provided:
- Protected memory between processes
- Preemptive multitasking
- Modern IPC (inter-process communication)
- Support for multiple processor architectures
BSD Compatibility Layer
Layered atop Mach was a BSD-derived Unix environment, providing:
- POSIX-compliant APIs
- Standard Unix commands and utilities
- Familiar filesystem semantics
- TCP/IP networking
Object-Oriented Frameworks
NeXTSTEP pioneered object-oriented application development with:
- Objective-C: An object-oriented extension to C
- Application Kit: GUI widgets and event handling
- Foundation: Base classes for common operations
- Interface Builder: Visual interface design
These frameworks would evolve into today’s Cocoa.
Display PostScript
NeXTSTEP used PostScript for display rendering, ensuring that what appeared on screen matched printed output—a precursor to macOS’s Quartz.
The Acquisition
In December 1996, Apple announced it would acquire NeXT for $429 million. The deal brought:
- NeXTSTEP technology: The foundation for the next-generation Mac OS
- Steve Jobs: Who would eventually return as CEO
- Key engineers: Including Avie Tevanian (who became Apple’s chief software architect)
From OPENSTEP to Rhapsody to Mac OS X
The transformation from NeXTSTEP to macOS occurred in stages:
OPENSTEP (1994-1997)
Before the Apple acquisition, NeXT had separated the operating system into:
- OPENSTEP: The application frameworks (portable to other OSes)
- NEXTSTEP/OPENSTEP for Mach: The complete OS
This separation facilitated the eventual Apple integration.
Rhapsody (1997-1998)
Apple’s first attempt at merging NeXT technology with Mac:
- Code-named “Rhapsody”
- NeXTSTEP renamed and modified for Mac hardware
- Included “Blue Box” for running classic Mac OS applications
Rhapsody was demonstrated publicly but never shipped as a consumer product.
Mac OS X Server 1.0 (1999)
The first released product combining NeXT and Apple technology:
- Based on Rhapsody
- Targeted at servers
- Introduced the Aqua interface concepts
- Still clearly NeXTSTEP under the hood
Mac OS X 10.0 (2001)
The first consumer release of the new operating system:
- Aqua interface: New visual design replacing NeXTSTEP’s look
- Carbon APIs: Allowing classic Mac applications to be ported
- Cocoa APIs: The renamed OPENSTEP frameworks
- Classic environment: Running Mac OS 9 in a compatibility layer
- Darwin foundation: The open-source Unix base
NeXTSTEP’s Legacy in Modern macOS
Many macOS characteristics trace directly to NeXTSTEP:
File Extensions and Bundles
NeXTSTEP popularized application bundles—directories that appear as single files:
$ ls -la /Applications/Safari.app/
total 0
drwxr-xr-x 3 root wheel 96 Dec 11 11:23 .
drwxr-xr-x 88 root wheel 2816 Jan 15 14:20 ..
drwxr-xr-x 7 root wheel 224 Dec 11 11:23 Contents
$ file /Applications/Safari.app/
/Applications/Safari.app/: directory
The .app extension and bundle structure come directly from NeXTSTEP.
Property Lists
The .plist files used throughout macOS for configuration:
$ file /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
/System/Library/LaunchDaemons/com.apple.metadata.mds.plist: XML 1.0 document text, ASCII text
Property lists originated in NeXTSTEP as a serialization format.
The Services Menu
The Services menu (under the application menu) allowing applications to provide functionality to other applications—pure NeXTSTEP.
/Library, ~/Library, and /System/Library
The three-tier Library structure:
/System/Library: Apple’s system resources/Library: Local administrator resources~/Library: User-specific resources
This hierarchy descends from NeXTSTEP’s organization.
launchd’s Ancestry
While launchd itself was created at Apple, its design philosophy—using property lists for service configuration—reflects NeXTSTEP’s approach to system management.
Objective-C and Cocoa
Until Swift’s introduction, Objective-C was the primary language for macOS development. Cocoa, the main application framework, is a direct evolution of OPENSTEP’s AppKit and Foundation.
The Mach Heritage
NeXTSTEP’s use of Mach brought several characteristics to macOS:
Mach Ports
Inter-process communication uses Mach ports:
$ sudo lsmp -p 1
Process (1) : launchd
name ipc-object rights flags boost reqs recv send sonce oref qlimit msgcount context identifier type
--------- ---------- ------ ----- ----- ---- ---- ---- ----- ---- ------ -------- -------- ---------- ----
...
Memory Objects
Mach’s virtual memory system underlies macOS’s memory management:
$ vm_stat
Mach Virtual Memory Statistics: (page size of 16384 bytes)
Pages free: 37103.
Pages active: 385918.
Pages inactive: 347108.
...
Task and Thread Model
macOS processes are Mach tasks containing threads—terminology that persists in debugging and profiling tools.
Understanding the Timeline
Here’s a consolidated timeline:
| Year | Event |
|---|---|
| 1985 | Steve Jobs leaves Apple, founds NeXT |
| 1988 | NeXTSTEP 0.8 released |
| 1989 | NeXTSTEP 1.0 released |
| 1993 | NeXTSTEP 3.0 - mature, stable release |
| 1994 | OPENSTEP specification published |
| 1996 | Apple acquires NeXT |
| 1997 | Steve Jobs returns to Apple |
| 1999 | Mac OS X Server 1.0 released |
| 2000 | Darwin open-sourced |
| 2001 | Mac OS X 10.0 “Cheetah” released |
| 2012 | OS X 10.8 “Mountain Lion” - “Mac” dropped from name |
| 2016 | macOS 10.12 “Sierra” - rebranded to “macOS” |
| 2020 | macOS 11 “Big Sur” - first version for Apple Silicon |
Why This History Matters
Understanding NeXTSTEP’s influence helps explain macOS peculiarities:
- Why Objective-C? Because NeXTSTEP chose it in the 1980s
- Why property lists? NeXTSTEP’s serialization format
- Why application bundles? NeXTSTEP’s packaging model
- Why Mach ports? NeXTSTEP’s kernel choice
- Why is Darwin BSD-based? NeXTSTEP’s Unix compatibility layer
When you encounter something in macOS that seems different from Linux or traditional BSD, the answer often lies in this NeXTSTEP heritage. The next chapter examines the kernel architecture that emerged from this history.