• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Preface > The Layers of Mac OS X

The Layers of Mac OS X

As mentioned earlier, Mac OS X is a multilayered system, as shown in Figure P-1. At its core is the Kernel Environment, or Darwin (http://opensource.apple.com/darwin), Apple's own open source operating system, which is based on the Mach 3.0 microkernel and BSD 4.4 Unix. Darwin gives Mac OS X its Unix core, along with features such as a protected memory environment, support for multithreaded applications, and stability that just wasn't attainable in earlier versions of the Mac OS.

The layers of Mac OS X

Next up, we have the Core Services layer. The Core Services provide a set of application program interfaces (or APIs), which allow applications to speak with and take instructions from the kernel. Unless you're a developer, the Core is something that you'll never have to touch or deal with. For programmers, though, the Core provides access to such things as Core Foundation, Core Graphics, Core Audio, CFNetwork, Carbon Core, and Apple Events, to name a few.

The Application Services layer gives Mac OS X its slick Aqua interface. The components in this layer include Quartz Extreme (which replaces QuickDraw from earlier versions of the Mac OS), QuickTime, and OpenGL. Quartz Extreme draws and renders graphics, performs anti-aliasing, and provides services for rendering and printing PDF. Quartz actually has two components: the Quartz Compositor and Quartz 2D. The Quartz Compositor is the window server, while Quartz 2D provides a set of APIs for rendering and drawing two-dimensional shapes.

OpenGL—the work horse of the graphics community—provides services for three-dimensional (3D) graphics. If you've played any of the games created in the last 10 years or so, chances are they were based on OpenGL. QuickTime is used in the OS to handle multimedia, such as streaming graphics and movies. Quartz, OpenGL, and QuickTime work together to render all you see in the graphical world of Mac OS X.

On top of it all, we have the Application Environment. This final layer is where you do all your work, and is where the applications are run. Apple provides two native APIs for applications to run on Mac OS X: Carbon and Cocoa. Carbon applications are older C and C++ applications that have been Carbonized to run natively on Mac OS X. Cocoa is Mac OS X's "pure" environment: Cocoa applications rely only on the frameworks provided by the system, and not on an older code base.

The application environment contains a pure Java system—not a virtual machine, as in older Mac systems—which allows you to run 100 percent-pure Java applications on Mac OS X. The current implementation is J2RE SE 1.3.1_03-69; however, as Jaguar proved, things will change, so you should expect Apple to improve the Java implementation as time goes by.

If you have an older Mac application that hasn't been Carbonized and isn't Cocoa- or Java-based, you're not out of luck. If your system also has Mac OS 9 installed (9.2.2 to be exact), you can run older Mac applications in the Classic Environment (or just Classic). When you're running Classic, you're basically running a watered-down implementation of Mac OS 9 on top of Mac OS X. Classic is covered in Chapter 3.

Also running at the application layer is the Terminal application (/Applications/Utilities), which is your command-line interface to the Unix shell. For users, the default shell is tcsh, and in Jaguar, the default shell for handling shell scripts is sh (the default for shell scripts in earlier versions of Mac OS X was zsh).

This multilayered architecture gives Mac OS X its power and elegance. Each layer—and in some cases, the components within each layer—is independent from the other, resulting in a system that hardly ever crashes.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint