Amoeba Vs. Mach OS - IIT Computer Science Department

Download Report

Transcript Amoeba Vs. Mach OS - IIT Computer Science Department

Amoeba Vs. Mach OS
Yousuf Surmust
Instructor: Marius Soneru
Course: CS550 Fall 2001
Amoeba Vs. Mach OS
Comparing Amoeba and Mach OS on the following
grounds:
1.
2.
3.
4.
5.
Design Goals
Architecture
Microkernel
Memory Management
Communication
Amoeba Design Goals
Network transparency:
All resource accesses to be network transparent.
A seamless system-wide file system
Processes execute at a processor of the system's choosing,
without the user's knowledge.
Object-based resource management:
Each resource is regarded as an object and all objects,
irrespective of their type, are accessed by a uniform naming
scheme.
Objects are managed by servers, where they can be accessed
only by sending messages to the servers.
User-level servers:
The system software was to be constructed as far as possible as
a collection of servers executing at user-level, on top of a
standard microkernel that was to run at all computers in the
system, regardless of their role.
Mach Design Goals
Multiprocessor operation:
Execute on a shared memory multiprocessor.
Both kernel-mode threads and user-mode threads could be
executed by any processor.
Operating system emulation:
To support the binary-level emulation of UNIX and other
operating systems.
Mach allows for the transparent redirection of operating system
calls to emulation library calls and thence to user-level operating
system servers.
Flexible virtual memory implementation:
Mach provides the ability to layer emulation of other operating
systems as well, and they can even run concurrently.
Portability: Designed to be portable to a variety of hardware
platforms.
Mach Design Goals
Support for diverse architectures:
including multiprocessors with varying degrees of shared
memory access.
Integrated memory management and inter-process communication
to provide efficient communications of large numbers of data
Heterogeneous system support:
make Mach widely available
Compatibility:
offers full compatibility with UNIX 4.3BSD.
Ability to function with varying inter-computer network speeds
Simplified kernel structure
Distributed operation, providing network transparency to clients
and an Object oriented organization both internally and
externally.
Basic Concepts
Amoeba
A distributed system for use
on CPU collection connected
by LAN. Multiprocessors and
WAN added later.
Amoeba has pool. User logs
into machine.
OS decides where to run
command, based on load.
No concept of home
machine.
Mach
A single, multiprocessors and
LAN added later.
Mach do not attempt to
attempt to spread lout load.
Concept of home machine is
present.
Current Hardware
Amoeba
SPARC (SUN4c & SUN4m)
386/486
68030
SUN 3/50
SUN 3/60.
At the Vrije Universiteit,
Amoeba runs on a collection
of 80 single-board SPARC
computers connected by an
Ethernet, forming a powerful
processor pool.
Mach
MicroVAX I & II
VAX11/750, 11/780, 11/785,
820x, 8300, 8600, 8650.
VAX 11/784 - 411/780's with
8 megabytes of shared
memory.
VAX 11/789- 411/785's.
IBM RT/PC.SUN3
Encore MultiMax.
Comparison of Microkernels
Amoeba is a complete
distributed operating system
constructed as a collection of
user-level servers supported
by the microkernel
Amoeba has a minimal
kernel
Less number of system calls
Mach is primarily microkernel
designs geared towards the
emulation of existing
operating systems, in a
distributed system.
Mach kernel functionality to
support widest range of
applications.
Mach has more than five
times number of systems
calls as compare to the
amoeba.
Process Management
Scheduling:
Amoeba gives processes the choice of run-to-completion vs.
Preemptive scheduling for its threads. Mach allows processes to
determine the priorities and scheduling policies of their threads
in software.
Multiprocessors:
Both kernels run on multiprocessors, but they differ in how
they use the CPUs.
Object model and capabilities:
Amoeba is based on the object model, and has capabilities for
processes, segments, and other kernel and user objects,
providing an integrated naming and protection scheme for all
objects in the entire system.
Mach only has capabilities for ports managed by kernel in
capability lists, one per process. Port capabilities passed in
controlled way.
Process Management
Thread Synchronization
Thread synchronization is done by mutexes and semaphores in
Amoeba. In Mach it is done by mutexes and condition variables.
Scheduling:
Both systems support processes with multiple threads per
process. In both cases, the threads are managed and scheduled
by the kernel, although user-level threads packages can be built
on top of them.
Thread migration concept:
Amoeba threads run on the same processor but processes may
be spread over the CPUs. Threads on different processor can
share same address space.
Mach use processor set concept to control of which threads
assigned to which processor. This mechanism allows true
parallelism among the threads of a single process.
Memory Management
Address space
In Amoeba, a process can have any number of variable length
segments mapped into its virtual address space wherever it
wants to. Mach provides to its user processes is a linear address
space from 0 to some maximum address. Within this address
space, processes can define regions, which are ranges of
addresses, and can map memory objects onto regions.
Paging
Amoeba does not support demand paging, so all of a process segments
must be in memory when it is running.
In Mach pages can be moved in and out of memory, as space requires.
A memory object need not be fully in memory to be used. When an
absent page is touched, its external pager is told to find it and bring it
in. This mechanism supports full demand paging.
Memory Management
Object based system and page based system
Amoeba supports an object-based system that allows variablesized software objects to be shared using the kernel’s reliable
broadcast mechanism. Mach has a network message server that
supports a page-based system.
Distributed shared memory
Both systems support distributed shared memory but they do it
in different ways. Amoeba supports shared objects replicated on
all machines. Objects can be of any size and support operations.
Reads are done locally and writes use reliable broadcast. Mach
use paged based distributed shared memory.
Communication
Form of communication:
Amoeba supports three forms of communication: unreliable
one-way message passing, reliable RPC, and reliable totally
ordered group communication. Mach supports one form: reliable
one-way message passing.
Messages typed:
Messages in Amoeba have a fixed part and a variable part and
are un-typed. Messages in Mach have only a variable part and
are typed.
Only Amoeba allows multiple replicated servers to listen to the
same service address to stochastically distribute the requests
over the servers.
Communication
Message transmission:
Amoeba uses a custom protocol called FLIP (Fast Local Internet
Protocol) for actual message transmission. In OSI terms, FLIP is
a network layer protocol, whereas RPC is more of
connectionless transport or session protocol.
Mach allows messages to be transmitted from one process to
another using the copy-on-write mechanism. Amoeba does not
have this.
Ports: In Amoeba, messages are addressed to service
addresses. The receiving thread must do a RECEIVE call that
provides the buffer directly in user space. In Mach, messages
are sent to ports. Mach support port sets, although they are
only for receiving, not sending.
Mach’s ports are named by capabilities managed by the kernel
and referred to by their indices in the kernel’s capability list.
Only Mach has SEND-ONCE capabilities.
Conclusion
In this paper I have thoroughly surveyed and
compared two operating systems, Amoeba and Mach.
I have found that these two OS microkernels are
quite similar in various ways. Since both OS were
independently designed and implemented but it is
surprising fact that these differences are not very big.
Both Amoeba and Mach were tested several times by
their designer and they changed OS several times
based on experiences gained form earlier versions.