Jump to content

Extension (Mac OS)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by GRAHAMUK (talk | contribs) at 06:59, 18 April 2005 (create). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

On the Apple Macintosh operating system prior to Mac OS X, 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.

The concept of extensions was not present in the original Macintosh system software, but the system nevertheless had a private 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. Since taking advantage of this mechanism was a hack, Apple responded by providing a more managed solution. Initially this itself was in the form of an 'INIT' hack, where Apple added an 'INIT' that would search for further files of type 'INIT' in the System Folder, and load and run them. This allowed INITs to work without having to actually move them directly into the System file's resource fork.

Gradually, INITs evolved into system extensions, gaining additional protocols along the way, such as suppying an icon to be displayed at boot time. The 'parade of icons' across the screen as each init loaded became familiar to all Mac users.

System extensions were traditionally a source of instability on the Macintosh, as third-party code could not be controlled and would often patch the system in ways that did not always work correctly. In addition different extensions might try to patch the same part of the system, which could lead to conflicts and other instability. Tracking down these sources of trouble was another task most Mac users encountered at some point.

Later versions of the system attempted to make the process easier by creating a separate folder which contained the extensions, and later still by adding an Extension Manager, which allowed the user to quickly enable or disable particular extensions, and also to define sets of them that would work correctly.

INITs and System extensions were the way by which some of the earliest known computer viruses were transmitted - the fact that the system blindly loaded and executed an INIT's code was an obvious security risk, but in the days of limited networking and no internet, such viruses did relatively little harm.