Enhanced Resource Sharing in UNIX

UNIX provides a programming model for the user which gives an illusion of multiprocessing. On uniprocessors, this illusion works well, providing communication paths, process security and a simple programming environment. Unfortunately, this model is not powerful enough to take full advantage of modern multiprocessor hardware. This results from a design which uses data queueing and preemption to provide the multiprocessing illusion. Recent proposals for lightweight processes in UNIX show that other programming models may be effectively supported as well. These models provide for virtual address space sharing between tasks by breaking the process into several lightweight contexts that may be manipulated more quickly than a normal process. Unfortunately, such models raise questions about support for normal UNIX semantics, scheduling performance, and kernel overhead. This paper describes a new programming model which goes beyond simple address space sharing, providing a selection of shared resources while An earlier version of this paper was delivered at the Winter 1988 USENIX Technical Conference (Dallas). @ Computing Systems, Vol. I . No. 2 . Spring 1988 111 retaining the key parts of the UNIX process model. The concept of a process is retained along with most of its semantics. The fundamental resource shared is the virtual address space. In addition, open file descriptors, user and group IDs, the current directory, and certain other elements of the process environment may be shared. This makes for easy construction of useful servers and simple concurrent applications, while providing high performance support for more computationally intensive applications. This implementation, labelled process share groups, allows normal process actions to take place easily, such as system calls, page faulting, signalling, pausing, and other actions which are ill-defined in other models. The paper describes the philosophy which drove the design, as well as details of the implementation, which is based on, and upwardly compatible with, AT&T v.3 UNIX. Performance of normal UNIX processes is maintained while providing support for high performance parallel programming.