Plan 9
From open-encyclopedia.com - the free encyclopedia.
- This page is about the operating system; for the science fiction film, see Plan 9 from Outer Space.
Plan 9 is an operating system descended from Unix and developed by Bell Laboratories. It is not a Unix variant, however, but a separate operating system that looks very similar. Plan 9 explored several "simplifications" to the original Unix model that improved the experience of using and programming the system, notably in distributed multi-user enviornments. Plan 9 was a Bell Labs internal project for a number of years, but a public release was made in 1993, followed by a shrink-wrapped version in 1995. Bell lost commercial interest in the project in the later 1990s, and released a third version under a non-free license (but with source code available) in 2000, and finally under a new open source compatible license in 2002.
Rights to a derivative product, Inferno, are held by a UK company, Vita Nuova. Inferno shares many of the same design concepts as Plan 9, but uses a new application programming language, Limbo, and an accompanying virtual machine, Dis. Inferno is marketed as an embedded operating system, and is open source.
A readily installable runtime environment exists for x86 currently, but Plan 9 can be made to run, and compile binaries for, the Intel, MIPS, DEC Alpha, and PowerPC architectures. It is written in a strict dialect of ISO/ANSI C. It can import POSIX applications and can emulate the Berkeley socket interface. It has complete UTF-8 support, and a windowing system called rio.
The name is based on the scifi movie Plan 9 from Outer Space directed by Ed Wood, which many consider one of the worst movies ever made.
| Contents |
Background
Prior to the development of Plan 9, much of the ongoing research and development in operating systems had centered around several "hot" topics; multiprocessing and parallel computing, computer networking, and the idea of "subprograms" known as threads. Eventually it became clear that all operating systems were attempting to add these features at the same time. Development of these features was somewhat difficult, because if the feature under development were to have a bug, its placement inside the operating system's kernel would cause the entire machine to crash and need to be rebooted.
In the early 1980s a new concept started to develop, that of the microkernel. The "whole idea" of a microkernel is to reduce the kernel to the bare minimum functions shared by all operating systems at their core. This includes such duties as arbitrating access to hardware, memory, and time on the CPU. A complete OS would then be created as a selection of programs running on top of the kernel, known as servers, communicating to each other by passing messages. The advantage to this approach was that it modularized the operating system, as well as allowing those messages to be passed among machines to create a single larger computer.
The poster child for microkernel designs was the Mach kernel. Through the 1980s and 1990s many efforts were made to introduce commercial versions of Mach, but today only a single example still exists, Mac OS X. At the time of introduction, the overhead of several specific design features in Mach made it run slower than existing Unix kernels, and as the market moved on to application design as opposed to operating systems, interest in Mach dwindled.
Design concepts
Plan 9's designers were interested in similar goals as the microkernel world, but made rather different architecture and design choices to achieve them. Instead of asking the question "what do all operating systems want to do?", Plan 9 asked "what is Unix really trying to do?" The answers to these two questions are very different, and in the case of Plan 9 this included:
- represent everything as a file
- make no distinction between local and remote objects
and nothing more.
Unix was the first operating system to attempt to describe the computing enviornment largely as a filesystem. However many key concepts simply didn't seem to map onto names at the time, and as new features were added they tended to exist "outside" the filesystem concept. By the time Plan 9 started to be developed, these distinctions no longer seemed to be as obvious.
Plan 9 extended the system beyond files to "names", that is, a unique path to any object whether it be a file, screen, user, or computer. All were handled using the existing Unix standards, but extended such that any object could be named and addressed, similar in concept to the more widely known URI system of the internet. In prior versions of Unix, devices such as printers had been represented by names using software convertors in /dev, but these were local names only and somewhat artificial. Under Plan 9 these distinctions no longer existed, files were as virtualized as printers, and both could be accessed anywhere.
Another key addition in Plan 9 was the ability for users to have different names for the same "real world" objects. In effect each user could create their own customized "meta-computer" by collecting various named objects into their workspace. Unix has a similar concept in which users gain privileges by being copied from another user, but in Plan 9 this can be extended to any object. In fact the user can easily spawn another copy of themselves, modify that copy, and then kill it without affecting any of the original resources.
A particularily interesting feature of Plan 9 was union directories, allowing directories across different media or across a network to be bound to other directories transparently. For example, another computer's /bin directory can be bound to one's own, and then this directory will hold both local binaries and the remote binaries and can use both transparently. Under Unix, mapping directories in this fashion would make the original disappear, one "covered" the other. Using the same system, under Plan 9 external devices and resources can be bound to /dev, making all devices network devices without additional code.
To illustrate how these features worked together to produce a greater whole, consider the rather interesting /proc directory, in which all running applications were listed. Applications are named objects under Plan 9, like anything else, and therefore it made sense to list them in a directory, like anything else. This simple change has fairly useful side-effects, allowing the user to use tools such as ls to search and sort the process list, which was previously available only to specialized tools. But even more interesting, users could union remote applications into their namespace as well, interacting with them as if they were local, and making network-wide processing almost a triviality.
The result is a distributed computing environment assembled from separate machines – terminals that sit on users' desks, file servers that store permanent data, and other servers that provide faster CPUs, user authentication, and network gateways, all using the existing hierarchical directory/name system familiar to most computer users. A user could "build" a system by collecting up directories on fileservers, applications running on servers, printers on the network and then bind them all together into their account running on a terminal.
Plan 9 is based on the best features of UNIX but was developed to demonstrate a concept, that of making communication the central function of the computing system. All system resources are named and accessed as if they were files and multiple views of the distributed system can be defined dynamically for each program running on a particular machine. This approach improves generality and modularity of application design by encouraging servers that hold any information to appear to users and to applications just like collections of ordinary files.
Key to supporting the network transparency of Plan 9 was a new low-level networking protocol known as 9P. Simply put, 9P was a system for connecting one named object to another using a file-like system. 9P can be thought of as a fast byte-oriented (as opposed to block-oriented) version of NFS, one that can talk to any object and not just an NFS server on the remote machine. The protocol is used to refer to and communicate with processes, programs, and data, including both the user interface and the network. It was then upgraded and then renamed 9P2000.
One downside to Plan 9 was that local file access was also handled via 9P talking to a fileserver, which led to performance problems in most "real world" cases. This problem was not solved by the time the Bell Laboratories project ended and major functionality stopped being added.
License
The source code is easily available, and Plan 9's license is now considered Open Source by OSI and free software by FSF, though judged not to be compatible with the GPL.
See also
Standard Plan 9 utilities
- sam - an editor
- acme - a multifunction editing environment
- plumber - interprocess messaging
- namespace
Implementation artefacts
- 9P - a filesystem protocol
- rendezvous - a basic synchronization mechanism
External links
- Plan 9 homepage
- Plan 9 Wiki
- See http://www.gnu.org/philosophy/plan-nine.html for details about the old, disused "open source" Plan nine licence
Plan 9 is also an independent record label owned by Glenn Danzig, lead singer of horror punk band the Misfits. Its name is also a tribute to the horror movie Plan 9 from Outer Space. Plan 9 has put out records by both of Glenn Danzig's bands, the Misfits and Samhain.
Plan 9 Publishing prints web comics.
Plan 9 is a record store located in Richmond, VA and Charlottesville, VA.
de:Plan 9es:Plan 9ja:Plan 9