Professional Documents
Culture Documents
96281
96281
a
he Amoeba project is a re- choice. Finally, there is a single, group of CPUs that can be dynami-
T
search effort aimed at un- system-wide file system. The files in cally allocated as needed, used, and
derstanding how to con- a single directory may be located on then returned to the pool. For ex-
nect multiple computers in different machines, possibly in dif- ample, the make command might
a seamless way [16, 17, 26, ferent countries. There is no con- need to do six compilations; so six
27, 3 11. The basic idea is to cept of file transfer, uploading or processors could be taken out of the
provide the users with the illusion downloading from servers, or pool for the time necessary to do
of a single powerful timesharing mounting remote file systems. A the compilation and then returned.
system, when, in fact, the system is file’s position in the directory hier- Alternatively, with a five-pass com-
implemented on a collection of archy has no relation to its location. piler, 5 x 6 = 30 processors could
machines, potentially distributed The remainder of this article will be allocated for the six compila-
among several countries. This re- describe Amoeba and the lessons tions, further gaining speedup.
search has led to the design and we have learned from building it. Many applications, such as heuristic
implementation of the Amoeba dis- In the next section, we will give a search in artificial intelligence (AI)
tributed operating system, which is technical overview of Amoeba as it applications (e.g., playing chess),
being used as a prototype and vehi- currently stands. Since Amoeba use large numbers of pool proces-
cle for further research. In this arti- uses the client-server model, we will sors to do their computing. We cur-
cle we will describe the current state then describe some of the more rently have 48 single board VME-
of the system (Amoeba 4.0), and important servers that have been based computers using the 68020
show some of the lessons we have implemented so far. This is fol- and 68030 CPUs. We also have 10
learned designing and using it over lowed by a description of how wide- VAX CPUs forming an additional
the past eight years. We will also area networks are handled. Then processor pool.
discuss how this experience has in- we will discuss a number of applica- Third are the specialized servers,
fluenced our plans for the next ver- tions that run on Amoeba. Mea- such as directory servers, file serv-
sion, Amoeba 5.0. surements have shown Amoeba to ers, database servers, boot servers,
Amoeba was originally designed be fast, so we will present some of and various other servers with spe-
and implemented at the Vrije our data. After that, we will discuss cialized functions. Each server is
Universiteit in Amsterdam, and is the successes and failures we have dedicated to performing a specific
now being jointly developed there encountered, so that others may function. In some cases, there are
and at the Centrum voor Wiskunde profit from those ideas that have multiple servers that provide the
en Informatica, also in Amsterdam. worked out well and avoid those same function, for example, as part
The chief goal of this work is to that have not. Finally we conclude of the replicated file system.
build a distributed system that is with a very brief comparison be- Fourth are the gateways, which
transparent to the users. This con- tween Amoeba and other systems. are used to link Amoeba systems at
cept can best be illustrated by con- Before describing the software, different sites and different coun-
trasting it with a network operating however, it is worth saying some- tries into a single, uniform system.
system, in which each machine re- thing about the system architecture The gateways isolate Amoeba from
tains its own identity. With a net- on which Amoeba runs. the peculiarities of the protocols
work operating system, each user that must be used over the wide-
logs into one specific machine-his mmhnlcal overvlew 06 area networks.
home machine. When a program is Amoeba All the Amoeba machines run
started, it executes on the home Syetem Arrhltectare the same kernel, which primarily
machine, unless the user gives an The Amoeba architecture consists provides multithreaded processes,
explicit command to run it else- of four principal components, as communication services, I/O, and
where. Similarly, files are local un- shown in Figure I. First are the little else. The basic idea behind the
less a remote file system is explicitly workstations, one per user, on kernel was to keep it small, to en-
mounted or files are explicitly cop- which users can carry out editing hance its reliability, and to allow as
ied. In short, the user is clearly and other tasks that require fast in- much as possible of the operating
aware that multiple independent teractive response. The worksta- system to run as user processes (i.e.,
computers exist, and must deal with tions are all diskless, and are pri- outside the kernel), providing for
them explicitly. marily used in intelligent terminals flexibility and experimentation.
In contrast, users effectively log that do window management,
into a transparent distributed sys- rather than as computers for run- OOJects ancl Capal8lll?les
tem as a whole, rather than to any ning complex user programs. We Amoeba is an object-based system.
specific machine. When a program are currently using Sun-Ss, It can be viewed as a collection of
is run, the system-not the user- VAXstations and X-terminals as objects, each of which contains a set
decides upon the best place to run workstations. of operations that can be per-
it. The user is not even aware of this Second are the pool processors, a formed. For a file object, for exam-
COYYUNlCATlONSOFTNSACN/December 1990/Vo1.33,NdZ 49
and nbytes, and invoke the remote can produce stub routines automat- one or more threads that run in
operation: ically [33]. The read-jile operation parallel. All the threads of a process
could be part of an interface (called share the same address space, but
do-operation(req-hdr, req-buf,
a class in AIL) whose definition each one has a dedicated portion of
req-bytes, rep-hdr,
could look something like this: that address space of use as its pri-
buf, rep-bytes);
vate stack, and each one has its own
class simple-file-server [ 100.. 199]{
Automatic generati,on of such a program counter. From the
read-file(*,
stub from the procedure header programmers’s point of view, each
in unsigned offset,
above is impossible. Some essential thread is like a traditional sequen-
in out unsigned nbytes,
information is missing. The author tial process, except that the threads
out char buffer
of the handwritten stub uses several of a process can communicate using
[nbytes:NBYTES]);
pieces of derived infcormation to do shared memory. In addition, the
the job. write-file(*,...); threads can (optionally) synchro-
nize with each other using mutexes
The buffer is used only to re- From this specification, AIL can
or semaphores.
ceive information from the file generate the client stub of the ex-
server; it is an output parameter, The purpose of having multiple
ample above with the correct mar-
threads in a process is to increase
and should not be sent to the shalling code. It can also generate
performance through parallelism,
server. the server main loop, containing
the marshalling code correspond- and still provide a reasonable se-
The maximum length of the mantic model to the programmer.
ing to the client stubs. The AIL
buffer is given in the nbytes pa- For example, a file server could be
specification tells the AIL compiler
rameter. The actual length of programmed as a process with mul-
that the operation codes for the
the buffer is the returned value tiple threads. When a request
simple-file-server can be allocated
if there is no error and zero comes in, it can be given to some
in the range 100 to 199; it tells
otherwise. thread to handle. That thread first
which parameters are input param-
File-cup is special:; it defines the eters to the server and which are checks an internal (software) cache
to see if the needed data are pres-
service that must carry out the output parameters from the server,
ent. If not, it performs remote pro-
remote operation. and it tells that the length of buffer
cedure call (RPC) with a remote
is at most NBYTES (which must be
The stub generator does not disk server to acquire the data.
a constant) and that the actual
know what the server’s opera-
length is nbytes. While waiting for the reply from
tion code for read-file is. This the disk, the thread is blocked and
The Bullet File Server, one of the
requires extra information. But,
file servers operational in Amoeba, will not be able to handle any other
to be fair, the human stub writer requests. However, new requests
inherits this interface, making it
needs this extra information too. can be given to other threads in the
part of the Bullet File Server inter-
In order to be able to do auto- face: same process to work on while the
matic stub generation, the inter- first thread is blocked. In this way,
class bullet-server [200..299] {
faces between client and servers multiple requests can be handled
inherit simple-file-server; simultaneously, while allowing each
have to contain the information
crest-file(*,...); thread to work in a sequential way.
listed above, plus information
about type representation for all The point of having all the threads
language/machine combinations AIL supports multiple inheritance share a common address space is to
used. In addition, the interface so the Bullet server interface can make it possible for all of them to
specifications have to have an in- inherit both the simple file inter- have direct access to a common
heritance mechanism which allows face and, for instance, a capability cache-something that is not possi-
a lower-level interface to be shared management interface for restrict- ble if each thread is its own address
by several other interfaces. The ing rights on capabilities. space.
readfile operation, for instance, Currently, AIL generates stubs The scheduling of threads within
will be defined in a low-level inter- in C, but Modula stubs and stubs in a process is done by code within the
face which is then inherited by all other languages are planned. AIL process itself. When a thread
file-server interfaces, the terminal- stubs have been designed to deal blocks, either because it has no
server interface, and the segment- with different representations- work to do (i.e., on a get-request) or
server interface. such as byte order and floating- because it is waiting for a remote
The Amoeba Interface Lan- point representation-on client reply (i.e., on a do-operation), the
guage (AIL) is a language in which and server machines. internal scheduler is called, the
the extra information for the gen- thread is blocked, and a new thread
eration of efficient stubs can be mreaus can be run. Thus threads are effec-
specified, so that the AIL compiler A process in Amoeba consists of tively co-routines. Threads are not
(a) (b)
FlGUR6 5. RK bchrecn USer RrO@Ssesin three wmnOn aScS for three diffennt SVStemS. local RKS are RKS In nhidi the dlent and
setwr are running as different gmcessesbut on the same processor.
Remote RKs are bmmn different machines. (1) Dclav in msec. (b) Band-
width In Rbytevsr. The Unir dfiver ImPIemeIttsRmoelIa RKS and Rmoebl protocol under Sun Unix.
kernel to user and 575 kbyteslsec cess and taken out by the kernel for obtained from a paper published in
when copying it (L. Peterson, pri- transmission. Since the 68020 pro- May 1990 [ 191 and applies to Mach
vate communication). cessor has eight 4-byte data regis- 2.5, in which the networking code is
Similarly, the published Sprite ters, up to 32 bytes can be trans- in the kernel. The Mach RPC per-
figures are also kernel-to-kernel. ferred this way. formance is worse than any of the
Sprite does not support RPC at the Topaz RPC was obtained on other systems by more than a factor
user level, but a close equivalent is Fireflies, which are VAX-based of 3 and is 10 times slower than
the time it takes to send a null mes- multiprocessors. The performance Amoeba. A more recent measure-
sage from one user process to an- obtained in Figure 6 can only be ment on an improved version of
other and get a reply, which is obtained using several CPUs at Mach gives an RPC time of
4.3 msec. The user-to-user band- each end. When only a single CPU 9.6 msec and a throughput of
width is 170 kbytes/sec [34]. is used at each end, the null RPC 250,000 bytes/set (R. Draves, pri-
V uses a clever technique to im- time increases to 4.8 msec and the vate communication).
prove the performance for short throughput drops to 313 kbytes/ Like Amoeba itself, the bullet
RPCs: the entire message is put in sec. server was designed with fast per-
the CPU registers by the user pro- The null RPC time for Mach was formance as a major objective. Next
diately. At present this is impossi- many applications. For example, a Probably the worst mistake in the
ble, and must either be simulated simple way to update a replicated design of Amoeba 4.0 process man-
with multiple RPCs or finessed. database is to send a reliable multi- agement mechanisms was the deci-
63