8.1. Looking BackTom Kilburn, R. Bruce Payne, and David J. Howarth described the Atlas supervisor program in a 1961 paper.[1] A result of work that originated in the Computer Group at Manchester University, the Atlas supervisor controlled the functioning of the Atlas computer system. When inaugurated in late 1962, Atlas was considered the most powerful computer in the world. It also had the earliest implementation of virtual memorythe so-called one-level storage system that decoupled memory addresses and memory locations. The core memory system of Atlas used a form of indirect addressing based on 512-word pages and page-address registers. When access to a memory address was made, a hardware unit (the memory management unit, or MMU) automatically attempted to locate the corresponding page in core memory (primary memory). If the page was not found in core memory, there was a nonequivalence interruptiona page fault, which resulted in the supervisor transferring data from a sector of drum store (secondary memory) to core memory. This process was referred to as demand paging. Moreover, the Atlas system provided per-page protection that allowed the supervisor to lock certain pages such that they became unavailable except when on interrupt control. A page replacement scheme was also used to move pages that were less likely to be used back to the drum store.
Within the next few years, virtual memory concepts were widely adopted, as major processor vendors incorporated virtual memory support in their processors. Most commercial operating systems of the 1960s and 1970s were capable of virtual memory. 8.1.1. Virtual Memory and UNIXWhat can be considered as the Zeroth Edition of UNIX (late 1969) was not multiprogrammedonly one program could exist in memory at a time. It employed swapping as a form of memory management policy wherein entire processes, rather than individual pages, were transferred between physical memory and the swap device. Third Edition UNIX (February 1973) introduced multiprogramming, but it would not be until 3BSD (1979) that a UNIX-based system would be capable of paged virtual memory. 8.1.2. Virtual Memory and Personal ComputingCompared with UNIX, virtual memory would become part of personal computing much later, with personal computer software lagging behind the hardware by several years. Table 81 shows the time frames in which virtual memory (and multiprogramming) were introduced in personal computing.
8.1.3. Roots of the Mac OS X Virtual Memory SubsystemWe saw in Chapter 1 that the RIG and Accent operating systems were Mach's ancestors. One of Accent's prime goals was to use virtual memory to overcome RIG's limitations in the handling of large objects. Accent combined paged virtual memory and capability-based interprocess communication (IPC), allowing large IPC-based data transfers through copy-on-write (COW) memory mapping. The Accent kernel provided the abstraction of a memory object, which represented a data repository, and had a backing store such as a disk. Contents of disk blocksdisk pages, whether they corresponded to an on-disk file or a paging partitioncould be mapped into an address space. Mach evolved from Accent as a system suited for general-purpose shared memory multiprocessors. Like Accent, Mach's VM subsystem was integrated with its IPC subsystem. However, Mach's implementation used simpler data structures, with a cleaner separation of machine-dependent and machine-independent components. Mach's VM architecture inspired several others. The VM subsystem of BSD Networking Release 2 (NET2) was derived from Mach. The 4.4BSD VM subsystem was based on Mach 2, with updates from Mach 2.5 and Mach 3. The 4.4BSD implementation was the basis for FreeBSD's VM subsystem. Moreover, Mach's VM architecture has several design similarities with that of SunOS/SVR4, which was independently designed around the same time as Mach. The core of the Mac OS X VM architecture is a derivative of, and largely similar to, the Mach VM architecture. However, as the operating system has evolved and undergone various optimizations, several minor and a few major differences have appeared in its VM subsystem's implementation.
|