[comp.os.research] Plan 9 from Bell Labs

presotto@coma.att.com (07/31/90)

%
% Thanks to Dave Presotto for making this paper available.  This appeared in
% the UKUUG proceedings and was mentioned in UNIX Today(!).
%
% I have included the introduction here.  The full paper can be gotten by
% anonymous FTP from midgard.ucsc.edu (128.114.134.15).  The file is
% pub/plan-9.ps.Z (PostScript).  Let me know if there are any problems
% fetching or printing.  --DL
%


                   Plan 9 from Bell Labs


                          Rob Pike
                       Dave Presotto
                        Ken Thompson
                       Howard Trickey

                          ABSTRACT

          Plan 9 is a  distributed  computing  environ-
     ment.  It is assembled from separate machines act-
     ing as CPU servers, file servers,  and  terminals.
     The pieces are connected by a single file-oriented
     protocol and  local  name  space  operations.   By
     building  the  system  from  distinct, specialised
     components  rather  than  from  similar   general-
     purpose  components,  Plan  9  achieves  levels of
     efficiency, security, simplicity, and  reliability
     seldom  realised  in  other  distributed  systems.
     This paper discusses the building  blocks,  inter-
     connections, and conventions of Plan 9.



Introduction.

Plan 9 is a general-purpose,  multi-user,  portable  distri-
buted  system implemented on a variety of computers and net-
works.  It lacks a number of features often found  in  other
distributed systems, including
     (i)     A uniform distributed name space,
     (ii)    Process migration,
     (iii)   Lightweight processes,
     (iv)    Distributed file caching,
     (v)     Personalised workstations,
     (vi)    Support for X windows.

Unhappy with the trends in commercial systems,  we  began  a
few  years  ago  to design a system that could adapt well to
changes in computing hardware.  In particular, we wanted  to
build  a  system  that could profit from continuing improve-
ments in personal machines with bitmap graphics, in  medium-
and  high-speed  networks, and in high-performance micropro-
cessors.  A common approach is to connect a group  of  small
personal  timesharing systems-workstations-by a medium-speed
network, but this has a number of  failings.   Because  each
workstation  has  private  data,  each  must be administered
separately; maintenance is  difficult  to  centralise.   The
machines  are  replaced every couple of years to take advan-
tage of technological improvements, rendering  the  hardware
obsolete often before it has been paid for.  Most telling, a
workstation is a largely self-contained system, not special-
ised to any particular task, too slow and I/O-bound for fast
compilation, too expensive to be used just to run  a  window
system.   For  our purposes, primarily software development,
it seemed that an approach based on distributed  specialisa-
tion  rather  than compromise could better address issues of
cost-effectiveness, maintenance,  performance,  reliability,
and  security.  We decided to build a completely new system,
including compiler, operating system,  networking  software,
command  interpreter,  window  system,  and (on the hardware
side) terminal.  This construction would also offer an occa-
sion  to  rethink, revisit, and perhaps even replace most of
the utilities we had accumulated over the years.

Plan 9 is divided along  lines  of  service  function.   CPU
servers  concentrate  computing  power into large (not over-
loaded) multiprocessors; file servers  provide  repositories
for  storage;  and  terminals give each user of the system a
dedicated computer with bitmap screen and mouse on which  to
run  a  window  system.   The  sharing of computing and file
storage services provides a sense of community for  a  group
of  programmers,  amortises costs, and centralises and hence
simplifies management and administration.

The pieces communicate by a single protocol, built  above  a
reliable data transport layer offered by an appropriate net-
work, that defines each service as a rooted tree  of  files.
Even  for services not usually considered as files, the uni-
fied design permits some noteworthy and profitable simplifi-
cation.   Each process has a local file name space that con-
tains attachments to all services the process is  using  and
thereby  to  the  files  in those services.  One of the most
important jobs of a terminal is to support its  user's  cus-
tomised view of the entire system as represented by the ser-
vices visible in the name space.

To be used effectively, the system requires a CPU server,  a
file  server, and a terminal; it is intended to provide ser-
vice at the level  of  a  departmental  computer  centre  or
larger.   The  CPU server and file server are large machines
best housed in an air conditioned machine room  with  condi-
tioned  power.   The  system's  strengths  stem in part from
economies of scale, and the scale we have in mind is  large.
One of our goals, perhaps unrealisable, is to unite the com-
puting environment for all of AT&T Bell Laboratories  (about
30,000  people)  into  a  single  Plan  9  system comprising
thousands of CPU and file  servers  spread  throughout,  and
clustered  in,  the  company's various departments.  That is
clearly beyond the administrative capacity  of  workstations
on Ethernets.

The following sections describe the basic components of Plan
9, explain the name space and how it is used, and offer some
examples of unusual services that illustrate how  the  ideas
of Plan 9 can be applied to a variety of problems.