Lably
Skip to content

Copland (operating system)

Operating system by Apple

  • 18 min read
  • 3 chapters

Related on Lably

Through Operating system, Information technology and Microkernel

Development officially began in March 1994. Over the next several years, previews of Copland garnered much press, introducing the Mac audience to operating system concepts such as object orientation, crash-proofing, and multitasking. In August 1995, David Nagel, a senior vice president, announced at Macworld Expo that Copland would be released in mid-1996. The following May, Gil Amelio stated that Copland was the primary focus of the company, aiming for a late-year release. Internally, however, the development effort was beset with problems due to dysfunctional corporate personnel and project management. Development milestones and developer release dates were missed repeatedly.

Ellen Hancock was hired to get the project back on track, but quickly concluded it could never ship. In August 1996, it was announced that Copland was canceled and Apple would look outside the company for a new operating system. Among many choices, they selected NeXTSTEP and purchased NeXT in 1997 to obtain it. In the interim period, while NeXTSTEP was ported to the Mac, Apple released the much more legacy-oriented Mac OS 8 in 1997 based upon adding components from Copland, and Mac OS 9 in 1999 to transition forward. Mac OS X became Apple's next-generation operating system in 2001.

The Copland development effort has been described as an example of feature creep. In 2008, PC World included Copland on a list of the biggest project failures in information technology history.

Design

Mac OS legacy

Launched in 1984, the Macintosh and its operating system were designed from the start as a single-user, single-tasking system, which allowed the hardware development to be greatly simplified.

The Macintosh lacks multitasking but tries to fake it, and it insists on a complicated user interface but leaves much of the work up to the application. These are serious drawbacks, and it is difficult to imagine elegant repairs for them.

— Adam Brooks Webber, Byte (September 1986)

These limits meant that supporting the multitasking of more than one program at a time would be difficult, without rewriting all of this operating system and application code. Yet doing so would mean the system would run unacceptably slow on existing hardware. Instead, Apple adopted a system known as MultiFinder in 1987, which keeps the running application in control of the computer, as before, but allows an application to be rapidly switched to another, normally simply by clicking on its window. Programs that are not in the foreground are periodically given short bits of time to run, but as before, the entire process is controlled by the applications, not the operating system.

Because the operating system and applications all share one memory space, it is possible for a bug in any one of them to corrupt the entire operating system, and crash the machine. Under MultiFinder, any crash anywhere will crash all running programs. Running multiple applications potentially increases the chances of a crash, making the system potentially more fragile.

Adding greatly to the severity of the problem is the patching mechanism used to add functions to the operating system, known as CDEVs and INITs or Control Panels and Extensions. Third party developers also make use of this mechanism to add features, including screensavers and a hierarchical Apple menu. Some of these third-party control panels became almost universal, like the popular After Dark screensaver package. Because there was no standard for use of these patches, it is not uncommon for several of these add-ons — including Apple's own additions to the OS — to use the same patches, and interfere with each other, leading to more crashing.

Copland design

Copland was designed to consist of the Mac OS on top of a microkernel named Nukernel, which would handle basic tasks such as application startup and memory management, leaving all other tasks to a series of semi-special programs known as servers. For instance, networking and file services would not be provided by the kernel itself, but by servers that would be sending requests through interapplication communications. The Copland system as a whole consists of the combination of Nukernel, various servers, and a suite of application support libraries to provide implementations of the well-known classic Macintosh programming interface.

Application services are offered through a single program known officially as the Cooperative Program Address Space. Mac programs run much as they do under System 7, as cooperative tasks that use the non-reentrant Toolbox calls. Copland provided much improved stability for applications running compared to System 7 – "the system won’t crash as it can in System 7. Instead, because the Copland microkernel tracks all resources (such as, tasks, timers, and areas), it can reclaim them when it terminates the process associated with your application.". A worst-case scenario is that an application in the CPAS environment crashes, taking down the entire environment with it. This does not result in the system as a whole going down, however, and the Cooperative Program Address Space environment is automatically restarted. In addition, Copland provides pre-emptive scheduling of tasks where "the Process Manager gives each primary task the opportunity to be preemptively scheduled by the microkernel."

New applications, written with Copland in mind, are able to directly communicate with the system servers and thereby gain many advantages in terms of performance and scalability. They can also communicate with the kernel to launch separate applications or threads, which run as separate processes in protected memory, as in most modern operating systems. These separate applications cannot use non-reentrant calls like QuickDraw, however, and thus could have no user interface. Apple suggested that larger programs could place their user interface in a normal Macintosh application, which then start worker threads externally.

Copland is fully PowerPC (PPC) native. System 7 had been ported to the PowerPC with great success; some parts of the system run as PPC code. There is enough 68k code left in the system to be run in emulation, and especially user applications, however that the operating system must map some data between the two environments. In particular, every call into the Mac OS requires a mapping between the interrupt systems of the 68k and PPC. Removing these mappings would greatly improve general system performance. At WWDC 1996, engineers claimed that system calls would execute as much as 50% faster.

Copland is also based on the then-recently defined Common Hardware Reference Platform, or CHRP, which standardized the Mac hardware to the point where it could be built by different companies and can run other operating systems (Solaris and AIX were two of many mentioned). This was a common theme at the time; many companies were forming groups to define standardized platforms to offer an alternative to the "Wintel" platform that was rapidly becoming dominant — examples include 88open, Advanced Computing Environment, and the AIM alliance.

The fundamental challenge of Copland's development and adoption was getting all of these functions to fit into an ordinary Mac. System 7.5 already uses up about 2.5 megabytes (MB) of RAM, which is a significant portion of the total RAM in most contemporaneous machines. Copland is a hybrid of two systems, as its native foundation also hosts the Cooperative Program Address Space application environment as well as Copland native Server tasks. Copland thus uses a Mach-inspired memory management system and relies extensively on shared libraries, with the goal of being about 50% larger than 7.5.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication