|
Amoeba on the top of UNIX
AMUNIX
The AMUNIX system provides the interface to the basic Amoeba concepts like
RPC messaging on the top of UNIX like operating systems, for example the open
source Linux and FreeBSD operating systems. It consists of these parts:
An UNIX version of the Amoeba thread module called AMUTHR
enabling multithreading normally not a core part of a UNIX operating
system. The AMUTHR module is entirely implemented in UNIX user process
space and nearly 100% compatible to the Amoeba kernel thread
implementation. The Amoeba thread implementation is weaved with the FLIP
protocol stack.
The AMUNIX library implementing Amoebas basic concepts like
capability management or the RPC interface, several server stib functions
and many more. It's mostly derived from the native Amoeba core
library.
The FLIPD protocol stack daemon entirely executing in the
UNIX user process domain providing access of AMUNIX programs to the
(Amoeba) network using the FLIP protocol. The FLIPD is also responsible
for loacl communication between Amoeba programs.
A comfortable development environment with predefined
makefiles for the Amoeba configuration manager amake similar to UNIX
make. With this development environement it's possible to built libraries
and Amoeba executables from C source code.
Figure 1 gives an overview and the relationship between these parts.
(Fig. 1) AMUNIX: the Amoeba layer on the top of UNIX.
Each AMUNIX executable incorporates the underlying UNIX system, glued in
the system C library. On the top of this system library, the AMUTHR module
was placed to enable multithreading. Each AMUNIX process has it's own
encapsulated thread management responsible only for this process. This
mechanism differs from the native Amoeba system (VX-Kernel) where all
processes share the same thread manger inside the kernel. The interface to
the Amoeba world is provided by the AMUNIX layer.
The AMUTHR thread module is nearly identical to theVX- kernel thread
implementation. Yes, indead, the source code from the kernel were used nearly
unchanged. A thread switch is performed by a small function written in
Assembler, consisting of less than 10 lines of code. Only the stack and
program code pointers must be changed during a thread switch.
The AMUNIX library differs from the native Amoeba core library only in the
thread and the communication backend. Under native Amoeba with the protocol
stack inside the kernel, the communication backend (RPC...) is implemented
simply with kernel system calls. Under AMUNIX, a UNIX like communication must
be established to the FLIPD daemon, an AMUNIX process, too. The communication
between AMUNIX processes and the FLIP daemon is realized with generic UNIX
sockets.
Using the AMUNIX layer, nearly all Amoeba programs known from the native
System can be build for the AMUNIX environment. The programming interface
kept unchanged including C header files. Only different libraries must be
linked with the AMUNIX executable. And finally, an AMUNIX program can be
started from any UNIX shell or forked by another UNIX program.
The first time an AMUNIX thread want to use the RPC interface (e.g. with a
trans() call), the AMUNIX layer will try to connect to the FLIP daemon
via a public UNIX control socket. After successfull connect, the FLIP daemon
will establish a new private communication socket only for this particular
thread. Additionally for RPC signal transmission, a dedicated signal socket
connection is opened if this is the first thread of the process. Each AMUNIX
process thread (using RPC) is handled by the FLIPD daemon with an own process
thread.
Each AMUNIX process (like a native Amoeba process) must be registered by the
FLIP protocol stack. Each Amoeba process gets an unique communication
endpoint identifier. As long as the process lives, it keeps this ID number,
as well the process migrates to another machine!
Figure 2 shows details of the FLIP daemon operation with AMUNIX processes.
(Fig. 2) The UNIX implementation of Amoebas FLIP protocol stack in
the UNIX user process space.
The network interface of the FLIP daemon needs direct access to the
network layer of the underlying operating system to receive and send raw
ethernet packets. Therefore FLIPD is connected to the UNIX kernel using some
kind of sockets, too. This is the only host system dependent part of the FLIP
daemon program. Under Linux, so called raw sockets, and under FreeBSD the
packet filter interface is used to connect FLIP to the network. The rest of
the FLIP source code (both for the native VX-Kernel and AMUNIX
implementation) is operating system independent.
References
- [KAS93]
M.F. Kaashoek, R. van Renesse, H. van Staveren, and A.S.
Tanenbaum
FLIP: an Internetwork Protocol for Supporting Distributed Systems
ACM Transactions on Computer Systems, pp. 73-106, Feb. 1993.
- [AMSYS]
Amoeba 5.3 System Administration Guide
- [AMPRO]
Amoeba 5.3 Programming Guide
- [COU98]
G. Cousineau, M. Mauny
The Functional Approach to Programming
Cambridge Press, 1998
- [Fab99]
Software: Fabrice Le Fessant, projet Para/SOR, INRIA
Rocquencourt.
- [OCAML305]
Software: OCaML version 3.05, Xavier Leroy et al., projet
Cristal, INRIA Rocquencourt
Generated by MANDoc (C) 2005 BSSLAB Dr. Stefan Bosse
Revision 1113144379
|