www. O S N E W S .com
News Features Interviews
BlogContact Editorials

Investigating the Plan 9 Operating System
By special contributor Andrew Hudson on 2006-07-19 18:45:40
Plan 9 is an operating system designed by the same people who created the original UNIX. Its development began in the late 1980's and it was a research project intended to address a variety of system scalability issues that the UNIX and LINUX kernels don't do particularly well, namely, distributed computing, distributed name spaces, and distributed file systems. Plan 9 is open source and its current and fourth major release was in 2002. It is available as an install or LiveCD and it can be downloaded here. Note: This is an entry to our Alternative OS Contest.

Plan9, 1/2

Plan 9 does not have a lot of flashy demos and is not intended for home users. It is not intended for use by novices or as a starter operating system. Instead, it was intended as a platform for trying out new algorithms, new methodologies, and new technologies and it does these very well. Its development tools and documentation assume a fair amount of familiarity with UNIX fundamentals.

Similarities to and differences from UNIX

Plan 9 is similar to UNIX in that is has a kernel, a command shell, and various C compilers. It also has man pages and runs standard UNIX applications like awk, emacs, cp, ls, and others listed here. It is different from UNIX in that the people who wrote it had 20 years of kernel and user experience to re-think and redesign the entire operating system. One major difference from UNIX and most other operating systems is that all major applications understand 9P, the underlying, distributed file system protocol. And because everything under Plan 9 is part of the file system, and the file system is distributed, everything under Plan 9 is distributed, and easily accessible as a file object.

Instead of the X11 window management system, Plan 9 has Rio. Rio is small, intuitive, and easy to program. A Plan 9 contributor, Geoff Collyer, wrote a graphics front end for the Reversi game in 469 lines of C code. That's impressive. Because Rio sits on top of 9P, Rio itself is a distributed windowing system.

UNIX's name server, BIND, has been replaced by ndb, which is easy to configure, much more secure, and is the partial basis for Plan 9's powerful, distributed name space.

Plan 9 does not use UNIX sockets for inter-process and inter-computer communications. Instead, all communications are done through 9P, the distributed file system paradigm. Protocol stacks and network cards are implemented as file system objects. Ethernet packet types are simply subdirectories. Plan 9 does have an extremely robust implementation of TCP/IP including IPV6. The abstraction of network communications separates ordinary programs from the gory details of network connection specifics. New protocols and transport media can be added or changed with virtually no impact on basic applications.

How is Plan 9 Better?

It was designed as a faster, cleaner, more-lightweight multi-processor operating system with better security in all aspects of operation. It uses lightweight processes that were designed for fine-grained resource control across forks. The thread library uses no kernel support and this makes it very quick. Plan 9's system libraries were built with multi-processing and Unicode character support from day 1. In fact, UTF-8 was invented for Plan 9. These libraries, in conjunction with a new generation of high performance Plan 9 compilers, make application development very fast and very reliable.

The Plan 9 security model is quite different from other mainstream operating systems. It has no root, administrator, or super user. Instead, local host owners have privileges over their own machines and can join various network groups that extend more privileges and access to resources such as printers or the CPU. Authentication is done using the Secstore client application. The Secstore server exchanges encrypted passwords or hardware passkeys, and stores sensitive information in memory.

Distributing resources is especially easy. Want to use someone else's sound card? Simply import their /dev/audio. Remember that everything in Plan 9 is a file system object, including multimedia devices. Want to debug a process running on someone else's machine? Simply import its /proc file.

Because all distributed resources have been rewritten for simplicity and efficiency, network administrators love it for its ease of use. Developers love Plan 9 because its libraries are elegant and the compilers are clean and fast.

How is Plan 9 worse?

As with other innovative operating systems, Plan 9 suffers from a lack of commercial support, a lack of device driver support, and a lack of mainstream applications. When this article was written Plan 9 did not have a web browser, it does not have support for VMWare virtualization (but does for Xen), it did not have accelerated video card support other than GForce and some Radeons, it supports only a few sound cards beyond AC97 and Soundblaster. It did not have office productivity software. And it did not support Windows compatibility through Wine.

Why use Plan 9?

Plan 9 offers only a few advantages to single workstation users running in isolation. Its advantages grow rapidly as the number of networked Plan 9 workstations increase. If you are developing a large distributed computing application, using Plan 9 makes a lot of sense. If, for instance, you are performing large-scale scientific computing that needs to run across a large number of computers you are faced with a variety of difficult challenges. A particular problem in large node computing is that the failure of a single node can bring your whole computing cluster to a halt. This problem is increasingly likely as the number of processors increase. Consider that a computer node with a mean time between failure of 10,000 hours (or about 1.15 years), when used in a cluster of 10,000 nodes will fail on average of once an hour. In other words, your large, expensive super-computer will crash once an hour. Plan 9 provides the basis for writing processes that can be mirrored or replicated in more efficient ways and can become fault tolerant. Without increased fault tolerance, large scale computing just doesn't scale well.

Table of contents

  1. Plan9, 1/2
  2. Plan9, 2/2

28  Comments - Printer friendly - Related stories

Tell a friend
Your full name:
Your email address:
Your friend's email:
Anti-spam measure:

News Features Interviews
BlogContact Editorials

WAP site - RSS feed
© OSNews LLC 1997-2007. All Rights Reserved.
The readers' comments are owned and a responsibility of whoever posted them.
Prefer the desktop version of OSNews?