Core Technologies of Mac OS X


The most important thing to know about Mac OS X is that it is based on open standards. This is because at the heart of OS X is Unix, which has played a major role in the development of the Internet. Because Unix is so Internet centric, OS X can be integrated in virtually any computing environment. In fact, the X in Mac OS X represents the X in Unix. But fear not, although Mac OS X is a Unix operating system, its operation does not require the mastery of complex Unix command syntax. As Apple publicizes, the command line is there for those who would like to use it, but it is not required for day-to-day operations. One can make as much or as little use of it as desired.

If OS X were to be compared to an automobile, we would see a similarity in that both are comprised of many parts. All these parts have very distinct functions, and yet, all make up a greater whole. Metaphorically speaking, the intention of Apple was to design a vehicle akin to a Formula 1 racing car. When the engineers at Apple set out to build OS X, they pulled together world-class technologies in an effort to build the most advanced consumer operating system the world has ever seen. Let’s take a closer look at these parts.

Darwin

The foundation of OS X is Darwin, which is an open source community/Apple joint effort. Though Darwin is a complete OS in and of itself, the primary objective of the Darwin project was to build an industrial-strength Unix-based operating system core that would provide greater stability and performance compared to all existing iterations of the Mac OS. To review Darwin in detail is beyond the scope of this book. Instead, we shall review some of Darwin’s more marketed features.

Mach microkernel

At the center of Darwin is the Mach microkernel, which is the foundation that provides basic services for all other parts of the operating system. Mach was developed at Carnegie-Mellon University, and it has a closely tied history with BSD Unix (Berkeley Software Distribution). It is Mach that gives OS X the features of protected memory architecture, preemptive multitasking, and symmetric multiprocessing.

Protected memory

Protected memory isolates applications in their own individual memory workspaces. When an application crashes, the program can be terminated without having a negative effect on other running applications or requiring a restart of the computer.

Advance memory management

Advance memory management automatically manages physical RAM and virtual memory dynamically as needed. Virtual memory uses hard disk space in lieu of physical RAM. Information that would normally sit in RAM, but is not currently needed, is transferred to the hard disk to free up physical RAM for the demands of data/applications that need it. This alleviates out-of-memory conditions and eliminates the need, experienced by users of previous Macintosh desktop operating systems, of having to manually adjust memory allocations.

Preemptive multitasking

Mac OS X, like all Mac OS versions since System 7, allows more than one application to be open and operating at the same time. This capability is known as multitasking. Prior to OS X, the Mac OS employed a version of multitasking referred to as cooperative multitasking. In cooperative multitasking, applications sometimes seemed unresponsive, because the system software could not efficiently manage the concurrent demands of multiple running programs. Mac OS X remedies this by implementing preemptive multitasking. Preemptive multitasking prioritizes processor tasks by order of importance. This more efficient method of managing processor tasks allows the computer to remain responsive, even during the most processor-intensive tasks.

Symmetric multiprocessing

Symmetric multiprocessing provides support for multiprocessor Macintosh computer systems. This allows applications to take advantage of two or more processors by assigning applications to specific processors or by splitting parts of applications known as threads between multiple processors simultaneously. By contrast, Mac OS 9 uses one processor for the majority of its tasks and programs need to be explicitly written to take advantage of multiprocessor Macs. These programs are limited to a few graphics and scientific applications.

Graphics technologies in Mac OS X

When it comes to graphics Mac OS X is one of the most powerful operating systems on the planet. To achieve this power, Mac OS X employs several standards-based technologies that are best-of-class. These technologies include Quartz, OpenGL, and QuickTime.

Quartz

Quartz is a powerful two-dimensional (2D) graphics-rendering system. It has built-in support for the Portable Document Format (PDF), on-the-fly rendering, compositing, and antialiasing. It supports multiple font formats, including TrueType, Postscript Type 1, and OpenType. Quartz supports Apple’s ColorSync color-management technology, allowing for consistent and accurate color in the print/graphics environment.

OpenGL

Open Graphics Library (OpenGL) started out as a technology initiative by Silicon Graphics Inc., a manufacturer of high-end graphics workstations. It has since become an industry standard for three-dimensional (3D) graphics rendering. It provides a standard graphics application programming interface (API) by which software and hardware manufacturers can build 3D applications and hardware across multiple platforms on a common standard. OpenGL is very prevalent in gaming, computer-aided design (CAD), professional 3D animation/modeling, and graphic design.

QuickTime

QuickTime is Apple’s cross-platform multimedia authoring and distribution engine. QuickTime is both a file format and a suite of applications. QuickTime has been around since 1991 and has matured into a very powerful technology. QuickTime supports over 50 media file formats encompassing audio, video, and still images. Some examples of these file formats include AIFF, AVI, JPEG, MIDI, MP3, MPEG-1, PICT, and TIFF. QuickTime has support for real-time video streaming, allowing viewers to tune in to live or prerecorded content on demand.

Aqua

Though Aqua is not a graphics technology in Mac OS X, it is its graphical user interface (GUI). Appearance-wise, it is a dramatic departure from OS 9’s Platinum interface, although it retains certain common elements. This allows for greater familiarity for legacy Macintosh operators, thus making the transition to OS X a more intuitive experience.

Mac OS X’s application environments

Application environments allow Mac OS X to run its modern OS-enabled applications while simultaneously supporting legacy Mac OS software. An application environment consists of various system resources, components, and services that allow an application to function. Mac OS X has five application environments: Cocoa, Carbon, Java, BSD, and Classic.

Cocoa

Cocoa applications are specifically developed for Mac OS X. Cocoa applications are incompatible with older Macintosh operating systems and therefore will not run on Mac OS 9. Cocoa applications take advantage of all of Mac OS X’s modern OS features, such as advance memory management, preemptive multitasking, symmetric multiprocessing, and the Aqua interface. Apple evangelizes Cocoa for its modern object-oriented programming techniques and rapid application development tools, which make application development significantly faster and easier than for Carbon. Some examples of Cocoa applications are OS X’s Mail and Preview applications as well as Netopia’s Timbuktu for Mac OS X.

Carbon

The greatest advantage of the Carbon application environment is that developers can build applications that run in either Mac OS 9 or OS X. When running within OS X, Carbon applications take advantage of most of OS X’s modern OS features, including the Aqua interface. In order for Carbon applications to run within Mac OS 9, the CarbonLib library must be present within the Extensions folder within the Mac OS 9 System Folder. Some examples of Carbon applications are AppleWorks 6.1, Acrobat Reader 5.0, and Quicken 2003. Ironically, some Carbon applications do not run under Mac OS 9. The most prominent is Microsoft’s Office Version X for Mac.

Packages and bundles

A package, sometimes referred to as a bundle, is a single-icon, point-and-click representation of an application. Just like previous Classic applications, Mac OS X’s Carbon and Cocoa applications can be comprised of multiple subordinate files and resources. In the GUI, all these subordinate pieces are neatly wrapped up into a representation of a single executable file for the end user. To view the contents of an application package, simply hold down the Control key while highlighting the Carbon or Cocoa application icon. You are then provided the option to show the package’s contents. For illustration purposes, Figure 1-1 depicts the contents of Internet Explorer for Mac OS X.

click to expand
Figure 1-1: Internet Explorer’s package contents.

Frameworks

Mac OS X frameworks are analogous to Mac OS 9 shared libraries in that they both contain dynamically loading code that is shared by multiple applications. Frameworks alleviate the need for applications that contain common code to individually load that code for each instance of those applications running simultaneously. Mac OS 9’s shared libraries can be found within the Extensions folder inside the System Folder. Examples of shared libraries are AppleScript and CarbonLib.

Java

The Mac OS X Java environment is Java 2 Standard Edition–compliant. It can run both Java applications and applets. The key advantage of Java development is that Java applications can run on any platform that contains a cross-compatible Java Virtual Machine.

BSD

The BSD application environment usually deals with command-line executable shell scripts. A shell script is similar to an MS-DOS batch file in that they are both text files that contain a sequence of commands. Interestingly enough, shell scripts do not necessarily have to be executed from the command line. Shell scripts can be implemented within Cocoa applications, allowing them to be executed from the GUI.

Classic

Classic provides OS X with the ability to run a full version of Mac OS 9 in a protected memory space. This compatibility environment enables the user to run most Macintosh legacy software that has not been updated to run natively in OS X. Just as in OS 9, if you have more than one Classic application open at the same time, it is possible that other Classic applications that are working in the background may bog each other down. That is because, just like in Mac OS 9, Classic applications share the Classic environment by using cooperative multitasking.

Additionally, Classic applications do not benefit from protected memory, at least not from each other. This lack of protected memory means that if one Classic application fails, it may make other Classic programs that are open fail as well (or make them unreliable). But, thanks to Darwin, in the event that an offending program within Classic causes the application environment to crash, the Mach microkernel safely terminates the process without negative consequences for other native OS X applications that are running. Conversely, a problem in a Mac OS X application does not affect the Classic environment or any Classic applications. When a Classic program fails, Apple states that you need to restart the entire Classic environment and all the Classic programs you were using.

Note

According to Apple, the Classic application environment will function with a minimum installation of Mac OS 9.1. However, Apple strongly recommends that Mac OS 9 be upgraded to its latest iteration, which at the time of this writing is Mac OS 9.2.2. If not, you will minimally need to update the Mac OS 9 Startup Disk control panel. This update is located on the Mac OS X Installer Disc 1 CD in a folder titled Utilities. This update provides the ability to select a Mac OS X system folder as a valid startup OS. Also, if you intend to use QuickTime within Classic, you will need to update it to Version 6.0.3.




Mac OS X Bible, Panther Edition
Mac OS X Bible, Panther Edition
ISBN: 0764543997
EAN: 2147483647
Year: 2003
Pages: 290

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