Understanding the architecture and terminology of Mac OS X is important to be able to use it effectively. Functionally, the Mac OS X architecture consists of several layers that are often shown graphically as in Figure 1.1. The base level of the operating system is its Unix core, which is called Darwin. Moving "up" through the layers, the next layer is the graphics subsystem, which consists of three parts: Quartz Extreme, OpenGL, and QuickTime. Then comes the application layer, which has four components, those being Classic, Carbon, Cocoa, and Java. Finally, the top layer is the user interface, which is called Aqua. Figure 1.1. You can think of Mac OS X being composed of four layers; the bottom layer provides the core OS services, whereas each layer toward the top provides services that are "closer" to the user.The Core OS: DarwinMac OS X is built on a Unix core; the Darwin core is based on the Berkeley Software Distribution (BSD) version of Unix. The heart of the Darwin core is called Mach. This part of the operating system performs the fundamental tasks, such as data flow into and from the CPU, memory use, and so on. Mach's major features include the following:
Under previous versions of the Mac OS, you had to control how virtual memory was used manually. Because the virtual memory system was not very efficient, you had to be careful about when you had it turned on because it would cause the performance of some applications to slow to a crawl, even if you had plenty of RAM. NOTE
Darwin also provides the input/output services for Mac OS X and easily supports three key characteristics of modern devices: plug-and-play, hot-swapping, and power management. Darwin, through its Virtual File System (VFS) design, supports several file systems under Mac OS X, including the following:
Darwin supports many major network file protocols. It supports Apple File Protocol (AFP) over IP client, which is the file-sharing protocol for Macs running Mac OS 8 and Mac OS 9. Network File System (NFS) client, which is the dominant file-sharing protocol on Unix platforms, is also supported. Mac OS X also provides support for Windows-based network protocols, meaning you can interact with Windows machines as easily as you can with other Macs. Because of Darwin, Mac OS X supports bundles; a bundle is a directory containing a set of files that provide services. A bundle contains executable files and all the resources associated with those executables; when they are a file package, a bundle can appear as a single file. The three types of bundles under Mac OS X are as follows:
NOTE Because of its Unix architecture, you will see many more filename extensions under Mac OS X than there were under previous versions of the OS. Most of the extensions for files you will deal with directly are easily understood (for example, .app is used for applications), but others the system uses are not as intuitive. The Graphics SubsystemMac OS X includes an advanced graphics subsystem, which has three main components: Quartz Extreme, OpenGL, and QuickTime. Quartz Extreme is the name of the part of the graphics subsystem that handles 2D graphics. Quartz Extreme provides the interface graphics, fonts, and other 2D elements of the system, as well as on-the-fly rendering and antialiasing of images. Under Mac OS X, the Portable Document Format (PDF) is native to the OS. This means you can create PDF versions of any document without using a third-party application, such as Adobe Acrobat (to get special features in PDF documents, such as navigation features, you still need to use an application that provides those features). You can quickly create a PDF version of any document with which you work; that document can be viewed with Acrobat Reader or Mac OS X's own Preview application. Quartz Extreme also supports TrueType, Type 1, and OpenType fonts and blends 3D and QuickTime content with the 2D content it provides directly. Because of Quartz Extreme, you don't need to install a font-smoothing utility, such as Adobe Type Manager, to be able to view and use all sizes of PostScript fonts, as you had to do under Mac OS 9 and earlier. The OpenGL component of the graphics subsystem provides 3D graphics support for 3D graphics applications and games. OpenGL is an industry standard that is also used on Windows and Unix systems. Because of this, it is easier to create 3D applications for the Mac from those that were designed to run on those other operating systems. The Mac OS X implementation of OpenGL provides many 3D graphics functions, such as texture mapping, transparency, antialiasing, atmospheric effects, other special effects, and more. NOTE Antialiasing reduces the pixelated appearance of a graphic to provide smooth edges instead of jagged ones. QuickTime provides support for many types of digital media, such as digital video and audio, and is the primary enabler of video and audio streaming under Mac OS X. QuickTime enables both viewing applications, such as the QuickTime Player, and creative applications, such as iMovie, iTunes, and many more. QuickTime is also an industry standard, and QuickTime files can be used on Windows and other computer platforms. The Application SubsystemMac OS X includes four different application environments (Cocoa, Java, Carbon, and Classic) that enable you to run a wide variety of applications, which, after all, is the primary reason you have a computer. The Cocoa environment offers developers a state-of-the-art, object-oriented application development environment. Cocoa applications are designed for Mac OS X from the ground up and take the most advantage of Mac OS X services and benefits. Most major applications, and lots of minor ones, have been created using Cocoa, which is good news for all Mac users. The Java 2 application environment enables you to run Java applications, including pure Java applications and Java applets. Java applications are widely used on the Web because they enable the same set of code to be executed on various platforms. You can also develop Java applications under Mac OS X. The other two application environments are primarily provided as bridges to older versions of applications that were created for previous Mac OS releases. The Classic environment enables Mac OS X to run applications that were written for previous versions of the OS (Mac OS 9.2 and earlier) without modification. Classic applications run as they did under previous versions of the Mac OS; in other words, they do not benefit from the advanced features of Mac OS X such as protected memory (Classic applications can be affected by other Classic applications, and the Classic environment itself can be affected when a Classic application has problems). NOTE Because Mac OS X has been around for a number of years now, it isn't likely that you will need to run any Classic applications. However, it is nice to know that you can should you ever need to. The Carbon environment enables developers to port existing applications to use Carbon application program interfaces (APIs); the process of porting a Classic application into the Carbon environment is called Carbonizing it. The Carbon environment offers the benefits of Darwin for Carbonized applications, such as protected memory and preemptive multitasking. Carbonizing an application is significantly less work than creating a new application from scratch, which enabled many applications to be delivered near the release of Mac OS X. Like Classic, Carbon was really intended as a means to make as many applications available under Mac OS X as possible. It is a transition environment rather than a permanent one (like Cocoa). The User InterfaceThe Mac OS X user interface, called Aqua, provides Mac OS X's great visual experience as well as the tools you use to interact with and customize the interface to suit your preferences. From the drop shadows on open windows to the extensive use of color and texture to the extremely detailed icons, Aqua provides a user experience that is both pleasant and efficient. |