What is Mac OS X?© Amit Singh. All Rights Reserved. Written in December 2003
Above the Kernel
This page discusses the software layers above the kernel in Mac OS X.
The Core Services layer can be visualized as sitting atop the kernel. This layer's most important sub-components are
CoreServices.framework. It contains various critical non-GUI system services (including APIs for managing threads and processes, resource, virtual memory and filesystem interaction):
- CarbonCore: Core parts of Carbon, such as various Carbon managers. Carbon has traditionally been a very critical Mac OS API family, and is so in Mac OS X as well.
- CFNetwork: An API for user-level networking that includes several protocols such as FTP, HTTP, LDAP, SMTP, ...
- OSServices: A framework that includes various system APIs (accessing disk partitions, the system keychain, Open Transport, sound, power, etc.)
- SearchKit: A framework for indexing and searching text in multiple languages.
- WebServicesCore: APIs for using Web Services via SOAP and XML-RPC.
CoreFoundation also includes a large number of other services. For example, it provides ways so that applications can access URLs, parse XML, maintain property lists, etc. In the directory
/System/Library/Frameworks/, refer to the directory
CoreFoundation.framework/Headers/ for headers belonging to
This layer can be visualized as being on top of Core Services. It includes services that make up the graphics and windowing environment of Mac OS X.
The core of the windowing environment is called Quartz. Quartz consists of broadly two entities:
- Quartz Compositor: consists of the window server (the
WindowServerprogram) and some private libraries. Quartz implements a layered compositing engine, in which every pixel on a screen can be shared between different windows in real time.
- Quartz 2D: a 2D graphics rendering library.
Quartz also has an integrated hardware acceleration layer called Quartz Extreme that automatically becomes active on supported hardware.
The graphics environment also has other rendering libraries, for example, OpenGL (2D and 3D), QuickDraw (2D) and QuickTime.
The Application Services layer also includes various other component frameworks:
- Apple Events: a mechanism for inter-application communication.
- Apple Type Services: a framework for managing and accessing fonts on Mac OS X.
- ColorSync: Apple's color management system that's integrated with Mac OS X.
- CoreGraphics: a graphics framework that's used for implementing Quartz.
- FindByContent: an API that allows searching specific volumes or folders for files containing the specified content.
- HIServices: framework providing human-interface related services, such as for icon management, translation, "pasteboard" (clipboard) etc.
- LangAnalysis: an API to the Language Analysis Manager, allows for analyzing morphemes (a morpheme is a meaningful linguistic unit, that is, a distinctive collocation of phonemes, having no smaller meaningful parts) in text.
- LaunchServices: a medium-level interface to starting applications, including opening documents with either a specified or the default application, open URLs, etc.
- PrintCore: an API to the printing subsystem.
- QD: a 2D graphics engine.
- SpeechSynthesis: an API for generating synthesized speech.
There are multiple execution environments on Mac OS X within which respective applications execute:
- BSD: This application environment is similar to a traditional *BSD system and provides a BSD-based POSIX API. It consists of a BSD runtime and execution environment. Mac OS X uses FreeBSD as a reference code base for its BSD derivations (Panther derives from FreeBSD 5.0). The libraries and headers for this environment reside in their traditional location (
- Carbon: This is a set of procedural C-based APIs for Mac OS X that are based on the "old" Mac OS 9 APIs. Note that Carbon does not include all the old APIs - a subset of the old APIs has been modified to work with OS X. Some APIs have been dropped as they are not applicable any more because of the radical differences between Mac OS X and Mac OS 9.
- Classic: This is a compatibility environment so that Mac OS 9 applications can be run on Mac OS X. The Classic application is technically a virtualizer that runs in a protected memory environment, with multiple processes in Mac OS 9 layered on top of one BSD process.
- Cocoa: This is an object-oriented API for developing applications written in Objective-C and Java. Cocoa is an important inheritance from NEXTSTEP (a fact testified by the various
NS*names in its API). It is very well supported by Apple's rapid development tools, and is the preferred way of doing things on Mac OS X if what you want to do can be done through Cocoa. There are many parts of Mac OS X that have not "converted" to Cocoa completely, or at all. A Cocoa application can call the Carbon API. Cocoa is largely based on the OpenStep frameworks, and consists of primarily two parts: the Foundation (fundamental classes) and the Application Kit (classes for GUI elements).
- Java: This environment consists of a JDK, both command-line and integrated with Apple's IDE, a runtime (Hotspot VM, JIT), and various Java classes (AWT, Swing, ...).
Although Mac OS X has many directories similar to a traditional *nix system, such as
/etc (a symbolic link to
/tmp (a symbolic link to
/private/tmp, etc., it has many others that are unique to it, for example:
|root, the Local domain|
|Xcode developer tools|
|User installed frameworks|
|the Network domain|
|the System domain|
|Home directories, the User domain|
|Your movies directory (iMovie uses it by default)|
|Your music directory (iTunes uses it by default)|
|Your pictures directory (iPhoto uses it by default)|
|For sharing (contents visible to others)|
|Your www (apache) directory|