9P (the Plan 9 File system Protocol)

From Bauman National Library
This page was last modified on 30 November 2016, at 14:19.
Plan 9 from Bell Labs
Glenda, the Plan 9 Bunny, drawn by Renée French
Developer Bell Labs
Written in Dialect of ANSI C
Working state Current
Latest release Fourth Edition
Available in English
License GNU General Public License
Official website 9p.io/plan9/

Plan 9 from Bell Labs - is a distributed operating system, originally developed by the Computing Sciences Research Center at Bell Labs. It takes some of the principles of Unix, developed in the same research group, but extends these to a networked environment with graphical user interface|graphical terminals.

The name Plan 9 from Bell Labs is a reference to the Ed Wood 1959 cult science fiction Z-movie Plan 9 from Outer Space. Also, Glenda, the Plan 9 Bunny, is presumably a reference to Wood's film Glen or Glenda. The system continues to be used and developed by operating system researchers and hobbyists.


Plan 9 from Bell Labs was originally developed, starting mid-1980s, by members of the Computing Science Research Center at Bell Labs, the same group that originally developed Unix and C.The Plan 9 team was initially led by Rob Pike, Ken Thompson (computer programmer), Dave Presotto and Phil Winterbottom, with support from Dennis Ritchie as head of the Computing Techniques Research Department. Over the years, many notable developers have contributed to the project including Brian Kernighan, Tom Duff, Doug McIlroy, Bjarne Stroustrup and Bruce Ellis.

Plan 9 replaced Unix as Bell Labs's primary platform for operating systems research. It explored several changes to the original Unix model that facilitate the use and programming of the system, notably in distributed multi-user environments. After several years of development and internal use, Bell Labs shipped the operating system to universities in 1992. Three years later, in 1995, Plan 9 was made available for commercial parties by AT&T via the book publisher Harcourt Brace. With source licenses costing $350, AT&T targeted the embedded systems market rather than the computer market at large; Ritchie commented that the developers did not expect to do "much displacement" given how established other operating systems had become (InfoWorld).[1]

By early 1996, the Plan 9 project had been "put on the back burner" by AT&T in favor of Inferno (operating system), intended to be a rival to Sun Microsystems' Java books. In the late 1990s, Bell Labs' new owner Lucent Technologies dropped commercial support for the project and in 2000, a third release was distributed under an open source license. A fourth release under a new free software license occurred in 2002.

A user and development community, including current and former Bell Labs personnel, produced minor daily releases in form of ISO images. Bell Labs hosted the development. The development source tree is accessible over the 9P and Hypertext Transfer Protocol are used to update existing installations. In addition to the official components of the OS included in the ISOs, Bell Labs also hosts a repository of externally developed applications and tools.

Date Release Comment
1992 Plan 9 1st edition Released by Bell Labs to universities
1995 Plan 9 2nd edition Released by Bell Labs for non-commercial purposes
2000 Plan 9 3rd ed. (Brazil) Released by Lucent Technologies under an open source license
2002 Plan 9 4th edition Released by Lucent Technologies under a new free software license

Design concepts

The first idea means that, unlike on most operating systems,Process (computing) processes (running programs) each have their own view of the namespace, corresponding to what other operating systems call the file system; a single path name may refer to different resources for different processes. The potential complexity of this setup is controlled by a set of conventional locations for common resources.

The second idea means that processes can offer their services to other processes by providing virtual files that appear in the other processes' namespace. The Client–server model|client process's input/output on such a file becomes inter-process communication between the two processes. This way, Plan 9 generalizes the Unix notion of the Unix filesystem|filesystem as the central point of access to computing resources. It carries over Unix's idea of device files to provide access to peripheral devices (computer mouse|mice, removable media, etc.) and the possibility to mount (Unix)|mount filesystems residing on physically distinct filesystems into a hierarchical namespace, but adds the possibility to mount a connection to a server program that speaks a standardized protocol and treat its services as part of the namespace.

For example, the original window system, called 8½, exploited these possibilities as follows. Plan 9 represents the user interface on a terminal by means of three pseudo-files: mouse, which can be read by a program to get notification of mouse movements and button clicks, cons, which can be used to perform textual input/output, and bitblt, writing to which enacts graphics operations (see bit blit). The window system multiplexes these devices: when creating a new window to run some program in, it first sets up a new namespace in which mouse, cons and bitblit are connected to itself, hiding the actual device files to which it itself has access. The window system thus receives all input and output commands from the program and handles these appropriately, by sending output to the actual screen device and giving the currently focused program the keyboard and mouse input.distributed-system The program does not need to know if it is communicating directly with the operating system's device drivers, or with the window system; it only has to assume that its namespace is set up so that these special files provide the kind of input and accept the kind of messages that it expects.

Software for Plan 9

  • As a benefit from the system's design, most tasks in Plan 9 can be accomplished by using ls, Cat (Unix), grep, cp (Unix) and rm (Unix) utilities in combination with the rc shell (the default Plan 9 shell).
  • Factotum is an authentication server|authentication and key management server for Plan 9. It handles authentication on behalf of other programs such that both secret keys and implementation details need only be known to Factotum.[2]

Graphical programs

Plan 9 running acme and rc.

Unlike Unix, Plan 9 was designed with graphics in mind. After booting, a Plan 9 terminal will run the rio windowing system, in which the user can create new windows displaying. Graphical programs invoked from this shell replace it in its window.

The plumber (Plan 9) provides an inter-process communication mechanism which allows system-wide hyperlinking. Sam and acme are Plan 9's text editors.

Storage system

Plan 9 supports the Kfs, Paq, Cwfs, File Allocation Table, and Fossil file systems. The last was designed at Bell Labs specifically for Plan 9 and provides snapshot storage capability. It can be used directly with a hard drive or backed with Venti, an archival file system and permanent data storage system.

Software development

The distribution package for Plan 9 includes special compiler variants and programming languages, and provides a tailored set of libraries along with a windowing user interface system specific to Plan 9. The bulk of the system is written in a dialect of C (ANSI C) with some extensions and some other features left out). The compilers for this language were custom built with portability in mind; according to their author, they "compile quickly, load slowly, and produce medium quality object code".

A concurrent programming language called Alef was available in the first two editions, but was then dropped for maintenance reasons and replaced by a Thread library for C.[3]

Unix compatibility

Though Plan 9 was supposed to be a further development of Unix concepts, compatibility with preexisting Unix software was never the goal for the project. Many command line utilities of Plan 9 share the names of Unix counterparts, but work differently.

Plan 9 can support POSIX applications and can emulate the Berkeley socket interface through the ANSI/POSIX Environment (APE) that implements an runtime environment close to ANSI C and POSIX, with some common extensions (the native Plan 9 C interfaces conform to neither standard). It also includes a POSIX-compatible shell. APE's authors claim to have used it to port the X Window System X11 to Plan 9, although they do not ship X11 "because supporting it properly is too big a job". Some Linux binaries can be used with the help of a "linuxemu" (Linux emulator) application; however, it is still a work in progress. Vice versa, the vx32 virtual machine allows a slightly modified Plan 9 kernel to run as a user process in Linux, supporting unmodified Plan 9 programs.


Starting with the release of Fourth edition on April 2002, the full source code of Plan 9 from Bell Labs was freely available under Lucent Public License 1.02, which is considered to be open source license by the Open Source Initiative (OSI), free software license by the Free Software Foundation, and it passes the Debian Free Software Guidelines. In February 2014, the University of California, Berkeley, has been authorized by the current Plan 9 copyright holder – Alcatel-Lucent – to release all Plan 9 software previously governed by the Lucent Public License, Version 1.02 under the GNU General Public License, Version 2.


Cite error: Invalid <references> tag; parameter "group" is allowed only.

Use <references />, or <references group="..." />
  1. InfoWorld: [Electronic resource]: AT&T Bell Labs ships Plan 9 OS for embedded systems / Date of the application: 29.11.2016. — Access mode: [1]
  2. Security in Plan 9  : [Electronic resource]: Lucent Technologies / Date of the application: 29.11.2016. — Access mode: [2]
  3. Design of a Concurrent Window System  : [Electronic resource]: Plan_9 / Date of the application: 29.11.2016. — Access mode: [3]