Basic Software Components

Software is instructions and information that a computer uses to accomplish a task. We usually think of software as being stored on such media as hard disks, floppy disks, and optical discs, though actually software can be stored on any recordable medium—even paper. Also, software is not just for computers: It is used in many situations where machines carry out complex tasks—for example, handling emissions controls in an automobile. But for our purposes, we'll consider only software that is processed on computers and stored on common computer media.

Software can be divided into two primary categories: system software and application software.

System Software

System software manages computer hardware. Macintosh system software also provides a graphical user interface (GUI; pronounced “gooey”) to display information on the screen. Though the terms “system software” and “operating system” are synonymous for most users, the former is actually a broader category that includes the operating system, software drivers that perform such tasks as displaying video or reading a CD-ROM, and software needed to interact with the user for tasks such as understanding function key assignments.

For existing Apple hardware, Apple releases system software online or through retail outlets. Apple also releases system software bundled with new computers.

Apple currently has two versions of system software: Mac OS 9 and Mac OS X. There are many similarities—and a few differences—between the two.

Mac OS 9 constitutes the Classic environment in Mac OS X, and most software designed for Mac OS 9 can be run using the Classic environment of Mac OS X. Unlike previous versions of the Mac OS, Mac OS X is built on a UNIX-based foundation. Among the advantages of the Mac OS X core are that a Macintosh computer remains stable even if an application running on it stops responding, and that no single application can monopolize all of the computer's processing resources.

Just as a thorough knowledge of what the hardware components of a computer do and how they interact aids in troubleshooting, a good knowledge of what the software does and how it interacts with hardware components and the user makes troubleshooting easier and more efficient. For example, knowing how the startup sequence works and what the computer is doing at each step in the sequence can assist considerably in troubleshooting startup problems.

Startup Sequence

The startup sequence is an integral part of the system software. Computers are designed so that when you turn one on, it looks for and executes resources to make itself ready to use. In the case of Apple computers, that startup process extends to displaying a GUI. To explain the boot process, this section covers the key elements of the Mac OS X startup sequence, including the BootROM, the POST diagnostics, Open Firmware, BootX, the kernel, and Mach_Init.

NOTE

The word boot, short for bootstrap, is sometimes used to refer to the startup process the computer uses to reach a running state (as in “to pull yourself up by your bootstraps”).


In sum, the startup process consists of the following sequence of events, which ends with the desktop and icons being displayed on the screen:

  1. BootROM

  2. POST

  3. Open Firmware

  4. Boot variable

  5. BootX

  6. Kernel

  7. Mach_Init

MORE INFO

To learn more about the startup process, refer to http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/index.html.


BootROM

The first resource used to boot the computer is firmware called the BootROM, stored on a recordable memory chip. Firmware requires no power to retain information and can be updated (“flashed”) if needed.

The BootROM contains, in the order they are used:

  • Power-on self test (POST)

  • Diagnostics

  • Startup sound, error sound

  • Open Firmware

MORE INFO

For a detailed look at the BootROM and the early part of the startup process, refer to Technical Note TN1167, “The Mac ROM enters a New World” (http://developer.apple.com/technotes/tn/tn1167.html).


POST

When a user turns on a computer, POST—tests contained in the BootROM—verify that the computer's memory and processor are functioning properly.

NOTE

POST runs only when the computer is turned on, not when it is restarted. As a result, it takes slightly longer to start up a Mac initially than to restart one.


If the computer completes POST diagnostics successfully, it emits a startup sound. If not, the computer emits an error beep. These sounds vary from computer to computer.

At this stage of the startup process, the user will see a blank display.

MORE INFO

Refer to Knowledge Base documents 58183, “Power On Self-Test Beep Definition—Part 1,” and 58442, “Power On Self-Test Beep Definition—Part 2.”


Open Firmware

After POST, the computer accesses an area of the BootROM called Open Firmware, which contains basic descriptions and settings for the computer. Open Firmware controls the microprocessor after hardware initialization and diagnostics are performed, but before the main operating system takes control. It contains basic descriptions and settings for the computer, including building the device tree and probing the expansion slots for I/O devices.

The device tree is a data structure that the Macintosh startup firmware creates in system RAM to provide information about configured devices to other software, including firmware on PCI cards. Attached to it are the drivers and support software that devices need to operate. The device tree is also the structure from which Mac OS X extracts the original information to create the device portion of the Name Registry. Open Firmware queries PCI devices for their address space needs and dynamically assigns this space to each device. Then Open Firmware is ready to look for user input—for example, to notice whether the user is holding down the C key, so the Macintosh computer can start up from an Apple Hardware Test CD without needing an operating system available on a local disk.

Boot Variable

If Open Firmware does not detect user input, it reads a setting stored in a special portion of nonvolatile memory (NVRAM) called a boot variable. The boot variable describes where to find the software to boot the computer, as set by the startup disk preferences. In Mac OS 9, this software is the Mac OS ROM file; in Mac OS X, this software is called BootX.

At this stage of the startup process, the user will continue to see a blank display.

MORE INFO

Refer to Apple Technical Notes TN1061, “Fundamentals of Open Firmware, Part I: The User Interface” (http://developer.apple.com/technotes/tn/tn1061.html), and TN1062, “Fundamentals of Open Firmware, Part II: The Device Tree” (http://developer.apple.com/technotes/tn/tn1062).


BootX, Kernel, and Mach_Init

After years of using a relatively unchanged startup system, with the advent of Mac OS X Apple has introduced significant changes to that process. You may not ever have to dig in quite this deep, but this section describes the sequence of how BootX—the software that boots the computer—behaves.

BootX contains basic information about the hardware and is responsible for starting up the kernel. The kernel, also called the kernel environment, contains the basic instruction sets for the operating system. The kernel's primary function during the startup process is to load the Berkeley Software Distribution (BSD) and Mach_Init software, and to set up the I/O Kit, which is software used to communicate with the hardware and the network. The kernel—which includes Mach, BSD, the I/O Kit, file systems, and networking components—constitutes a subset of what Apple calls Darwin.

At the BootX stage of the startup process, the user should see a white display with a gray Apple logo in the center.

After BootX has loaded the kernel into memory, the kernel starts up and takes control. One of the kernel's first tasks is to start a process called Mach_Init.

With Mach_Init, the user can select whether to start up from an optical disc (by holding down the C key during startup) or to start up in single-user mode or verbose mode (by holding down Command-S or Command-V, respectively). Mach_Init responds to the user's decision by directing the startup process appropriately.

Mach_Init then runs two scripts that (along with other tasks) make sure the software on the disk is error-free and then tie the disk memory and RAM together, initiating the use of virtual memory.

At the kernel stage of the startup process, the user should see a white display with a gray Apple logo in the center, with a small spinning “gear” just below.

Mach_Init brings up the user environment, when you see the Mac OS X panel activity showing software being read into memory. The Mac OS X boot process concludes at the login window.

Application Software

Application software processes data for the user. An application can be any number of things, such as a word processor or a game. Application software generally relies on the operating system for compatibility with hardware.

Like system software, application software is sold by itself as well as bundled with computers. For example, iDVD is bundled with computers, while DVD Studio Pro is sold separately.

As software developers improve their products, they release new versions. When Apple does this, it describes the new version as a reference release, a software upgrade, or a software update, depending on the changes made to the software.

Reference Releases

Reference releases are major changes that can be identified by new, additional features or by resolutions to outstanding issues with older software. Reference releases are almost always available through retail channels. They are typically packaged in a box, and do not require that a previous version of the software be installed.

Software Upgrades

With an upgrade, most parts of the software have changed but not necessarily in major ways, and it usually requires a full reinstall of the software. Software upgrades generally do not require that a previous version already be installed except as a way to verify ownership.

Software Updates

An update may be available as a single release or as several independent releases, as is the case with the software updates feature of the system software. Software updates generally are modular or focus on key parts of a piece of software, usually addressing bugs or deficiencies without adding significant capabilities. Software updates generally require that a previous version already be installed.

Version Numbers

Version numbers can describe significant changes in software, as well as minor changes. The version number can be understood as reference.upgrade.update so that the closer to the left a number is, the more importance it indicates. For example, there would be more changes between the 10.0.4 and 10.1.0 releases than between the 10.0.3 and 10.0.4 releases. However, many software developers don't follow this numbering scheme.

MORE INFO

Refer to Knowledge Base documents 25784, “What's a 'computer-specific' Mac OS X release?”, and 25517, “Mac OS: Versions, builds included with computers (since 1998).”


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.25.144