Architecture of Mac OS X
From ArticleWorld
Apple's Mac OS X is an Unix-based operating system, inheriting much of NEXTSTEP's API. OS X's architecture is fairly complex, as the operating system itself is based on many other past projects. Taligent, Copland, NEXTSTEP and Rhapsody evolved into what is today Mac OS X, and a core which was released under an open-source license, under the name Darwin.
Contents |
The core
OS X's core is the XNU kernel. XNU is a microkernel containing code from BSD Unix and Mach, featuring preemptive multitasking and preemptive kernel threads, protected memory, inter-process communication, real-time support and kernel debugging support. The TCP/IP stack, process model, much of the POSIX API and the crypto framework is borrowed from BSD. Along with its extensions, it makes up the Kernel Environment.
Darwin
Built around the XNU kernel is Darwin. Darwin forms the base of the higher level components of Mac OS X, gathering a large number of open-source elements. It is interesting how Apple grouped all these in a single package. For example, the Secure Thrash Deletion (STD) is, in fact, an adapted version of srm. Several base packages like gcc and gdb have been heavily modified by Apple and released back to the open-source community, featuring (often radical) optimization for Apple's platform.
Core services
Right above the kernel is the Core Services layer. This provides the fundamental non-GUI services, including the Carbon library's core (CarbonCore), an user-level networking API (CFNetwork), the SearchKit, the WebServicesCore and the OSServices. Many other services are also available, for accessing URLs, parsing XML and many others.
Quartz and Application Environments
Quartz forms the foundation of the windowing environment of MacOS X. Quartz resembles NeXT DPS system, but uses PDF instead of PS, allowing for some interesting options, like using PDF as a native format for screenshots.
Alongside with Quartz, several execution environments are included. These include the BSD environment, that runs POSIX applications; Carbon, a C-based set of APIs; Classic, allowing Mac OS 9 applications to run; Cocoa, the environment introduced by OS X, directly inherited from NEXTSTEP; Java, including much of Apple's software, allowing Java software to be ran.