The Mac OS nanokernel is an
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
kernel that serves as the basis of most
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
based system software versions 7 through 9 of the
classic Mac OS
Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Mac (computer), Macintosh family of personal computers by Apple Computer, Inc. from 1984 to 2001, starting with System 1 and end ...
, predating
Mac OS X
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
.
The initial revision of this software is a single tasking system which delegates most tasks to an
emulator
In computing, an emulator is Computer hardware, hardware or software that enables one computer system (called the ''host'') to behave like another computer system (called the ''guest''). An emulator typically enables the host system to run sof ...
running the
Motorola 68000 series
The Motorola 68000 series (also known as 680x0, m68000, m68k, or 68k) is a family of 32-bit computing, 32-bit complex instruction set computer (CISC) microprocessors. During the 1980s and early 1990s, they were popular in personal computers and ...
(68k) version of the operating system. The second major revision supports
multitasking,
multiprocessing
Multiprocessing (MP) is the use of two or more central processing units (CPUs) within a single computer system. The term also refers to the ability of a system to support more than one processor or the ability to allocate tasks between them. The ...
, and
message passing
In computer science, message passing is a technique for invoking behavior (i.e., running a program) on a computer. The invoking program sends a message to a process (which may be an actor or object) and relies on that process and its supporting ...
, and would be more properly called a
microkernel
In computer science, a microkernel (often abbreviated as μ-kernel) is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, ...
. Unlike the 68k-derived Mac OS kernel running within it, the PowerPC kernel exists in a
protected memory
Memory protection is a way to control memory access rights on a computer, and is a part of most modern instruction set architectures and operating systems. The main purpose of memory protection is to prevent a process from accessing memory that h ...
space and executes
device driver
In the context of an operating system, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabli ...
s in
user mode
A modern computer operating system usually uses virtual memory to provide separate address spaces or regions of a single address space, called user space and kernel space. This separation primarily provides memory protection and hardware prote ...
.
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
In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
, 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
In computing, virtual memory, or virtual storage, is a memory management technique that provides an "idealized abstraction of the storage resources that are actually available on a given machine" which "creates the illusion to users of a ver ...
system to the PowerPC hardware. However, as the software is little documented, these might instead be handled by the emulator running in
user mode
A modern computer operating system usually uses virtual memory to provide separate address spaces or regions of a single address space, called user space and kernel space. This separation primarily provides memory protection and hardware prote ...
.
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
Memory protection is a way to control memory access rights on a computer, and is a part of most modern instruction set architectures and operating systems. The main purpose of memory protection is to prevent a process from accessing memory that h ...
. The
Open Transport
Open Transport was the name given by Apple Inc. to its implementation of the Unix-originated UNIX System V, System V STREAMS networking stack. Based on code licensed from Mentat's Mentat Portable Streams, Portable Streams product, Open Transport w ...
networking architecture introduced standardized PowerPC synchronization primitives. The
DayStar Digital Genesis MP
Macintosh clone
A Macintosh clone is a computer running the Classic Mac OS operating system that was not produced by Apple Inc. The earliest Mac clones were based on emulators and reverse-engineered Macintosh ROMs. During Apple's short lived Mac OS 7 licensing ...
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.
References
External links
René A. Vega's explanation of basic Mac OS architecturesupervisor modeQuestion from a non-programmer
{{Microkernel
Nanokernels
Classic Mac OS