• 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.

Figure P-1. The layers of Mac OS X

Next up is the Core Services layer. The Core Services provide a set of application program interfaces (or APIs) that 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 workhorse of the graphics community—provides services for three-dimensional (3D) graphics. If you've played any 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 is the Application Environment. This final layer is where you do all your work and 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—that allows you to run 100 percent-pure Java applications on Mac OS X. The current implementation in Mac OS X Panther is J2SE Version 1.4.1.

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 new default shell in Panther is bash, the very same shell that Linux and FreeBSD users worldwide rely on every day.

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