Extension (Mac OS)
Extension (Mac OS)
Main page

Extension (Mac OS)

logo
Community Hub0 subscribers
What are your thoughts?
Be the first to start a discussion here.
Be the first to start a discussion here.
Extension (Mac OS)

On the classic Mac OS (the original Apple Macintosh operating system), extensions were small pieces of code that extended the system's functionality. They were run initially at start-up time, and operated by a variety of mechanisms, including trap patching and other code modifying techniques. Initially an Apple developer hack, extensions became the standard way to provide a modular operating system. Large amounts of important system services such as the TCP/IP network stacks (MacTCP and Open Transport) and USB and FireWire support were optional components implemented as extensions. The phrase "system extension" later came to encompass faceless background applications as well.

Extensions generally filled the same role as DOS's terminate and stay resident programs, or Unix's daemons, although by patching the underlying OS code, they had the capability to modify existing OS behaviour, the other two did not.[dubiousdiscuss]

The concept of extensions was not present in the original Macintosh system software, but the system nevertheless had a private patching mechanism that developers soon learned to take advantage of - the INIT loader. This code would search for system resources of type 'INIT', and load and run them at boot time. The code resources had to be stored directly in the Mac System suitcase's resource fork, meaning it was only really available to "power users" who would be comfortable using ResEdit or other resource editor.

Since taking advantage of this mechanism was an unsupported hack, and only 32 INITs could be loaded in this manner, Apple responded by providing a more managed solution. Initially this itself was in the form of an 'INIT' resource with ID 31 placed in the System file that would search for further files of type 'INIT' in the System Folder, and load and run INIT resources inside them. (This is why some veteran Mac programmers still refer to the extensions loading mechanism as the "INIT 31 trick". INITs could now be installed simply by placing a file in the System Folder, well within the abilities of the average user. Starting with System 7, extensions were relocated to the Extensions folder within the System Folder for convenience, and an auto-routing mechanism was implemented so that placing an extension into the System Folder through drag and drop would actually place the file in the appropriate subfolder.

Extensions retained the resource type of 'INIT' throughout their lifetime, and the loader was gradually enhanced to search for these resources in numerous places, including in the resource forks of control panels in a variety of formats and the Chooser.

INITs evolved into system extensions, gaining additional ad hoc protocols along the way, such as supplying an icon to be displayed at boot time (the origin of this was 'ShowINIT'). The 'parade of puzzle pieces and icons' across the screen as each extension loaded became familiar to all Mac users. Apple themselves eventually released major (but optional) pieces of the operating system as extensions, such as QuickTime, QuickDraw 3D and many others. A substantial number of services and drivers in Mac OS—both official and third party—were provided as extensions, allowing for the OS to be trimmed down by disabling them.

System extensions were a common source of instability on the Macintosh, as third-party code was of variable quality and would often patch the system in ways that did not always work correctly. Some extensions didn't work properly together, or worked only when loaded in a particular order. In addition, different extensions might try to patch the same part of the system, which could lead to extension conflicts and other instability. Tracking down these sources of trouble was another task most Mac users encountered at some point. Troubleshooting Mac OS extensions could be a time-consuming process of bisecting and trial and error.

The simplest way to clean-boot the operating system was to hold the shift key: loading of extensions would be bypassed. System 7.5 added the Extensions Manager, which allowed the user to quickly enable or disable particular extensions, and also to define sets of them that would work correctly together. Extensions Manager came with two read-only base sets provided: one that contained the subset of extensions needed for basic OS operation, and one that enabled all the official extensions that shipped with the OS but disabled all third-party extensions.

See all
User Avatar
No comments yet.