Mac OS nanokernel

The Mac OS nanokernel is an operating system kernel that serves as the basis of most PowerPC based system software versions 7 through 9 of the classic Mac OS, predating Mac OS X.

The initial revision of this software is a single tasking system which delegates most tasks to an emulator running the Motorola 68000 series (68K) version of the operating system. The second major revision supports multitasking, multiprocessing, and message passing, and would be more properly called a microkernel. Unlike the 68K-derived Mac OS kernel running within it, the PowerPC kernel exists in a protected memory space and executes device drivers in user mode.

The nanokernel is very different from the Copland OS microkernel, although they were created in succession with similar goals.

System 7.1.2 – Mac OS 8.5.1
The original nanokernel, and the tightly integrated Mac 68k emulator, were written by emulation consultant Gary Davidian. Its main purpose is to allow the existing Motorola 68K version of the operating system to run on new hardware. As such, the normal state of the system is to be running 68K code. The operating system does little until activated by an interrupt, which is quickly mapped to its 68K equivalent within the virtual machine.

Other tasks may include switching back to PowerPC mode, if necessary, upon completion of the interrupt handler, and mapping the Macintosh virtual memory system to the PowerPC hardware. However, as the software is little documented, these might instead be handled by the emulator running in user mode.

This nanokernel is stored on the Mac OS ROM chip integrated into Old World ROM computers, or inside the Mac OS ROM file on disk on the New World ROM computers, rather than being installed in the familiar sense.

Interim development
Progress after 1994 demanded additional functionality. A forward-looking architecture was introduced for PCI card drivers in anticipation of the Copland microkernel called NuKernel, which supports memory protection. The Open Transport networking architecture introduced standardized PowerPC synchronization primitives. The DayStar Digital Genesis MP Macintosh clone requires kernel extensions to support multiprocessing. This evolution would later affect the overhaul to the nanokernel in Mac OS 8.6.

Mac OS 8.6 and later
Mac OS 8.6's nanokernel was rewritten by René A. Vega to add Multiprocessing Services 2.0 support. PowerMacInfo, distributed in the Multiprocessing SDK, is an application that displays statistics about the nanokernel's operation.