Industry Publications Index ... Click Here




Digital Unix and AIX

Originally published  June, 1996
by Carlo Kopp
1996, 2005 Carlo Kopp

Example Section Title

Digital Equipment Corporation (DEC) and IBM both jumped on the Unix bandwagon relatively late in the play. Both industry giants were well established vendors of proprietary multiuser systems during the mid eighties, and both suffered a significant loss of market share when Unix stormed the midrange multiuser system market during this period.

Arguably both of these vendors suffered in the early days of the Unix revolution from a degree of cultural schism, in that both had to split their structures to create new development, marketing and support organisations to accommodate the unique idiosyncrasies of the Open Systems game.

Despite the early pain experienced by both parties, today both DEC and IBM are well established in the Unix marketplace with appreciable market shares held by their workstation and server products. As both organisations targeted the commercial user base first and foremost, their product offerings reflect this with substantial ranges of add on extras aimed primarily at this customer base.

Digital Unix and OSF/1

DEC's path to stable home grown Unix product was tortuous, but has yielded in the end a very interesting product, and what is also the last mainstream Unix product substantially derived from BSD Unix.

The first of DEC's forays into the Unix marketplace was the VAX architecture hosted Ultrix, essentially a heavily modified port of 4BSD Unix, which was offered as an alternative to the proprietary VAX/VMS OS, and the do-it-yourself 4BSD release from Berkeley. DEC followed up with a badged MIPS port of 4BSD hosted on its MIPS architecture DECstation series of workstations. Still heavily used in academia, this now obsolescent product was the mainstay of DEC's early effort to win back market share.

The Digital Unix of today is a very different product, both in terms of genealogy and technology, and traces it origins back to the early nineties Unix Wars between the Open Software Foundation (OSF) and Unix International (UI). The OSF camp was primarily comprised of the established proprietary vendors who opposed the monopoly held by AT&T and sought to develop their own "standard" Unix, which would be competed commercially against the AT&T System V product. Sadly for the Unix community, the result of the Unix Wars favoured Microsoft and its proprietary product suite first and foremost, as many undecided customers turned to a "defacto" standard offering rather that deal with the then much divided and unstable Unix vendor base.

The OSF/1 operating system was the be the flagship product of the OSF, to be used as a standard on systems supplied by participating vendors. In the end, only DEC chose to use it commercially, producing the substantially enhanced Digital Unix as their mainstream Unix product.

OSF/1 is a hybrid of 4.3BSD, 4.4BSD and Carnegie-Mellon University Mach 2.5. The kernel of OSF/1 is substantially derived from Mach, and retains a large number of modern microkernel features which are not found in traditional Unix kernels.

Traditional Unix kernels are termed monolithic kernels, as the kernel is large and encompasses virtually all operating system functionality, including low level services such as scheduling, process management, device drivers, file systems and virtual memory. Microkernels on the other hand are very austere in functionality, and typically provide a small set of system calls to support the upper layers of the operating system. A microkernel will typically implement process scheduling and state management, inter-process communications and a virtual memory system, with driver support provided only for virtual memory devices such as disks. The Mach kernel follows this fundamental philosophy.

The OSF/1 kernel is thus split into two layers, the upper system services layer, and the lower core kernel layer, the latter substantially derived from Mach 2.5. It is the system services layer which implements the 4BSD components of the kernel, and provides the POSIX.1 system call interface. Where the OSF/1 system call interface differs from the generic POSIX.1 and 4BSD models is that it provides access to the Mach 2.5 message mechanism for interprocess communications.

The OSF/1 kernel provides multiprocessing functionality, multithreading of processes with Mach messaging for individual threads, shared library support, program loading functionality for a range of object file formats, dynamic loading of kernel modules for runtime kernel configuration. A feature of the OSF/1 kernel which has become widely adopted is the Logical Volume Manager (LVM), which allows the aggregation of multiple physical disks into a single logical disk. The kernel is built to support B1 and C2 security.

Digital Unix is substantially derived from OSF/1 R1.0, 1.1 and 1.2, but includes a large range of additional functional features intended to make the product more robust and functional. The aspect of Digital Unix which DEC stress as one of the operating system's principal technological advantages over its SVR3/4 based competitors is its support for Symmetrical Multi-Processing (SMP). The robustness and performance of SMP schemes is mainly of importance in large multiprocessor systems, where weaknesses in the implementation can severely penalise scaling performance, a metric of performance gained per added CPU.

Interestingly, DEC's SMP implementation funnels interrupts into a single CPU, a design philosophy which is more characteristic of Asymmetric MP (ASMP) schemes, DEC however assert that their implementation has not resulted in interrupt saturation of the CPU in question. This is probably due to the low microkernel context switching overheads, and high clock speeds of the Alpha AXP processors used.

SMP locking techniques are another area where DEC claim technological innovation. Digital Unix employs a scheme whereby SMP locks on kernel datastructures are implemented with granularities set for optimal performance, and a facility exists to "patch out" locks which are not required for given configurations, at boot time. The scheduler in Digital Unix is built to provide flexible assignment of processes to specific CPUs, a feature also found in some System V SMP implementations.

Other than the unique kernel design, DEC's OS will provide a standard programming interface and user toolkit. Digital Unix has an X/Open Unix 95 brand, and DEC claim compliance with XPG+ (Spec 1170), XTI, POSIX 1003.1/2, SVID, OSF AES and the XPG4 Common Desktop Environment. MIT X11R6 with 6.1 features is provided.

DEC's OSF/1 implementation has matured and provides a technologically interesting alternative to the AT&T based product. As DEC have expended much effort in providing standards compliant programming interfaces, portability of application code should not be an issue.

IBM AIX

IBM's AIX Operating System has the perhaps unique distinction of being the only mainstream Unix (or as purists would say, Unix-like) operating system be be wholly home grown from the ground up. This aspect of the product's genealogy has its plusses and its minuses. The plus aspect is that IBM have been very much free to build a product around their own requirements, designing in features which they consider appropriate, and avoiding the inclusion of design idiosyncrasies which they do not. The minus aspect is that marketing a unique product to often very technically conservative Unix experts can be a difficult task. Such customers have a big investment in Unix know-how, accumulated though many years of work with conventional AT&T and BSD implementations, and a product such as AIX which is in many ways unique requires a whole new learning process for a traditional, hack-the-system-files administrator. Despite this impediment in a technically unique market, IBM have to their credit persevered and managed to carve out a respectable chunk of the workstation and server markets.

The AIX kernel is conventional in the sense that it is a monolithic kernel, containing the same functional elements we are accustomed to seeing in traditional Unix implementations. The kernel contains a scheduler, process management functions, virtual memory management, device drivers, filesystems and interprocess communications.

The AIX kernel is, unlike most conventional Unix kernels, largely paged in and out of memory as required. The only components of the kernel which are locked in memory (pinned in IBM-speak) are the virtual memory subsystem and interrupt services, both of which cannot be paged. This is a functional feature designed to minimise memory usage. Interrupt services are embedded in the kernel in a conventional manner, pre-empting processes as required.

A unique feature of AIX is the use of a distinct model for user processes and kernel processes (Kprocs in IBM-speak), in that some system processes are run in the kernel's address space and are considered part of the kernel. The AIX scheduler is implemented as such a process, a strategy which has been used with some microkernel designs to provide easier manipulation of scheduling algorithms.

Signal handling is provided by the kernel, using a bitmask which is sampled when the kernel is about to transfer execution to a runnable process.

The virtual address model used by AIX is based upon a segmented memory model, as implemented in the IBM POWER "enhanced RISC" architecture (ie PowerPC and RS/6000 model). The address space is split into 16 256MB segments, providing for up to 4GB of total address space. Eight segments are typically used, providing for kernel text, user text, user private data, shared memory, shared library, kernel data and kernel I/O buffers. The four highest bits in a virtual address are used to provide the segment mapping, the remainder being an index into the segment. The AIX Virtual Memory Manager (VMM) provides conventional demand paging of disk storage into virtual memory, and is implemented with a paging daemon which uses an LRU paging algorithm.

The AIX I/O model is conventional, in that device drivers are used with upper and lower (interrupt service) components. In the instance of disk storage (DASD in IBM-speak), AIX uses a layered model. The system call interface accesses a Logical Volume Manager (LVM), which in turn accesses a Virtual File System (VFS) switch layer. The VFS then operates on vnodes, which map operations into a Logical File System (LFS) layer. At this point an operation will actually access the specific file system used, which in turn calls the upper portion of the device driver. A typical IBM filesystem implementation will use an inode (G-node in IBM-speak) based scheme. Inodes for open files are cached in memory (In-core Inodes in IBM-speak), and a hash mechanism is used for quick access.

Process management is built around a kernel proc table, and four essentially conventional operations are defined for a process lifecycle, ie creation through fork(), program loading through exec(), process termination through exit() and waiting for the death of a child process.

With the advent of AIX 4.1, multithreading of processes is supported. The addition of threading required some kernel changes, in that the user and proc tables were split into process and thread specific components, with separate thread and uthread structures created for this purpose.

The AIX scheduler, as noted, is implemented as a process, and with AIX 4.1 will schedule at a thread level, providing thread funneling and binding to specific CPUs. Three scheduling algorithms are provided for, including round robin, fixed priority and conventional (pre-emptive) AIX scheduling. A symmetric multi-processing scheme is used, but space limits preclude its discussion.

IBM's AIX is now a mature operating system, providing another technically interesting and in many ways unique alternative to the conventional offering. While the system has a number of idiosyncrasies, none of these are beyond a competent systems programmer's ability to master.



$Revision: 1.1 $
Last Updated: Sun Apr 24 11:22:45 GMT 2005
Artwork and text 2005 Carlo Kopp


Industry Publications Index ... Click Here