Mac OS X Architecture and Terminology

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

graphics/01fig01.gif

The Core OS: Darwin

Mac OS X is built upon 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:

  • Protected memory Mach provides a separate memory area in which each application can run. It ensures that each application remains in its own memory space and so does not affect other applications. This means that if a running application crashes or hangs, other applications aren't affected. You can safely shut down the hung application and continue working in the others.

    In contrast, previous versions of the Mac OS did not have protected memory. When one application crashed, it usually took down others and often the OS itself, which resulted in your losing unsaved data in all the applications. Under Mac OS X, only the data in the crashing application is at risk.

  • Preemptive multitasking Under Mac OS X (or more specifically Mach), the operating system controls the tasks that the processor is performing. This means that the OS controls the processes that the processor is performing to ensure that all applications and system services have the resources they need and that the processor is used efficiently. This ensures both stability and maximum performance for both foreground and background processes.

    This is in contrast to the cooperative multitasking in previous versions of the Mac OS. Under that scheme, applications had to fight among themselves for the resources they needed. This resulted in instability when applications couldn't get the resources that they needed and poor performance for those applications that were not able to "grab" the system resources they needed (this is why some processes stopped when you moved them to the background).

  • Advanced virtual memory The Mach core uses a virtual memory system that is always on. It manages the virtual memory use efficiently so that virtual memory is used only as necessary to ensure maximum performance.

    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

graphics/ontheweb_icon.gif

Darwin is Open Source. This means that the code of which Darwin is composed is freely available to anyone who wants to use it. A programmer can download the Darwin code and modify it. This means that it is possible to provide alternative versions of the Darwin core to change and enhance Mac OS X. The Darwin code and documentation can be found at www.apple.com/darwin.


NOTE

Another significant ramification of the way in which Darwin manages memory is that it dynamically assigns RAM to applications when they open. Under Mac OS X, the system handles all RAM management for you; there is no more manual RAM allocation for applications as there was under previous versions of the OS.


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 different file systems under Mac OS X, including the following:

  • The Mac OS Extended Format, also known as Hierarchical File System Plus or HFS+, is the default file system under Mac OS X as it has been under the more recent versions of the Mac OS (those since Mac OS 8). This file system efficiently supports large hard drives by minimizing the smallest size used to store a single file.

  • The Mac OS Standard Format, known as HFS, which was the standard for Mac OS versions prior to Mac OS 8.

  • UFS, which is the standard file system for Unix systems.

  • UDF, which is the Universal Disk Format, used for DVD volumes.

  • ISO 9660, which is a standard for CD-ROMs.

Darwin supports two major network file protocols: Apple File Protocol (AFP) over IP client; AFP is the file-sharing protocol for Macs running Mac OS 8 and Mac OS 9, and Network File System (NFS) client, which is the dominant file-sharing protocol on Unix platforms. Mac OS X also provides support for Windows-based networks and includes native support for SAMBA file servers.

Mac OS X uses 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. There are three types of bundles under Mac OS X, as follows:

  • Applications Under Mac OS X, applications are provided in bundles. Frequently, these bundles are designed as file packages so that you see only the files with which you need to work, such as the file to launch the application. The rest of the application resources might be hidden from the user. This makes installing such applications simple.

  • Framework A framework bundle is similar to an application bundle except that a framework provides services that are shared across the OS; frameworks are system resources. A framework contains a dynamic shared library, which means that different areas of the OS as well as applications can access the services provided by that framework. Frameworks are always available to the applications and services running in the system. For example, under Mac OS X, QuickTime is a framework; applications can access QuickTime services by accessing the QuickTime framework. Frameworks are not provided as file packages and so you see the individual files that make up that framework.

  • Loadable Bundle Loadable bundles are executable code (just like applications) available to other applications and the system (similar to frameworks) but must be loaded into an application to provide their services. There are two main types of loadable bundles: plug-ins (such as those used in Web browsers) and palettes (which are used in building application interfaces). Loadable bundles can also be presented as a package so that you see and work with only one file.

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 that the system uses are not as intuitive.


The Graphics Subsystem

Mac OS X includes a very advanced graphics subsystem, which has three main components: Quartz, OpenGL, and QuickTime.

NOTE

graphics/new10point2_icon.jpg

Under Mac OS X version 10.2, several improvements have been made to the graphics subsystem, which is now called Quartz Extreme.


Quartz Extreme is the name for the part of the graphics subsystem that handles 2D graphics. Quartz provides the interface graphics, fonts, and other 2D elements of the system. Quartz provides on-the-fly rendering and anti-aliasing of images. Under Mac OS X, the Portable Document Format (PDF) is native to the OS. This means that 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 will 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 also supports TrueType, Type 1, and OpenType fonts. Quartz Extreme also blends 3D and QuickTime content with the 2D content it provides directly.

NOTE

Anti-aliasing reduces the pixelated appearance of graphics to provide smooth edges instead of jagged ones.


Because of Quartz, you no longer need to install a font-smoothing utility, such as Adobe Type Manager, to be able to view and use all sizes of PostScript fonts.

The OpenGL component of the graphics subsystem provides 3D graphics support for 3D applications, such as 3D graphics applications and games. OpenGL is an industry standard that is also used on Windows and Unix systems. This means that it is easier to create 3D applications for the Mac from those that were designed to run on these other operating systems. The Mac OS X implementation of OpenGL provides many 3D graphics functions, such as texture mapping, transparency, anti-aliasing, atmospheric effects, other special effects, and more.

QuickTime provides support for many different types of digital media, such as digital video, 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 Subsystem

Mac OS X provides the Classic environment to enable it to run Classic applications. It also includes three application development environments: Carbon, Cocoa, and Java 2.

NOTE

graphics/new10point2_icon.jpg

Support for Java 2 was added in version 10.2.


The Classic environment enables Mac OS X to run applications that were written for previous versions of the OS without modification. This provides access to thousands of existing applications that will run under Mac OS X. Classic applications run as they do 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).

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.

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 of the applications that are included with Mac OS X are Cocoa versions; as time passes, more and more Cocoa applications will become available and will eventually be the dominant type under Mac OS X.

The Java 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 User Interface

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



Special Edition Using Mac OS X v10. 2
Special Edition Using Mac OS X v10.2
ISBN: 0789729040
EAN: 2147483647
Year: 2005
Pages: 260
Authors: Brad Miser

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net