Extension (Mac OS)
From Wikipedia, the free encyclopedia that anyone can edit.
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 box for Mac OS X v10. ... Mac OS X is the latest version of the Mac OS, the operating system software for Macintosh computers. ...
The INIT mechanism
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. Since taking advantage of this mechanism was an unsupported 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 INIT, which had the resource ID number 31, is why some old-school Mac programmers still refer to the extensions loading mechanism as the "INIT 31 trick" [1]). This change allowed INITs to work without having to actually move them directly into the System file's resource fork using ResEdit or other resource editor. The resource fork is a construct of the Mac OS operating system (and implemented in all of the filesystems used on the Macintosh, MFS, HFS and HFS Plus), used to store structured data in a file, alongside and tightly bound to unstructured data within the data fork. ... ResEdit version 2. ...
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. The Chooser is an application programme for Macintosh systems using the Classic Mac OS. It started out life as a desk accessory and became a regular application programme as of System 7. ...
Extensions
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 'parade of icons' across the screen as each init 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. Ad hoc is a Latin phrase which means for this [purpose]. It generally signifies a solution that has been tailored to a specific purpose, such as a tailor-made suit, a handcrafted network protocol, and specific-purpose equation and things like that. ... QuickTime is a multimedia technology developed by Apple Computer, capable of handling various formats of digital video, sound, text, animation, music, and immersive virtual reality panoramic images. ... QuickDraw 3D, or QD3D for short, is a 3D graphics API developed by Apple Computer, originally for their Macintosh computers, but delivered as a cross-platform system. ...
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. 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. Extension conflicts were a common problem on Apple Macintosh computers running versions of Mac OS prior to X, especially System 7. ...
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 the Extension Manager, which allowed the user to quickly enable or disable particular extensions, and also to define sets of them that would work correctly together.
The loading order of extensions was always based on the alphabetical sorting of their filenames, which was an amusing quirk. Thus the simple expedient of renaming an extension was one method by which conflicts that depended on loading order could be resolved.
Viral vectors
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 were easily contained and did relatively little harm. In computer security technology, a virus is a self-replicating program that spreads by inserting copies of itself into other executable code or documents (for a complete definition: see below). ...

