23
Amoeba Distributed Amoeba Distributed Operating System Operating System Ken Baggett Ken Baggett CPSC 550 CPSC 550 Spring 2006 Spring 2006

Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

Amoeba Distributed Amoeba Distributed Operating SystemOperating System

Ken BaggettKen Baggett

CPSC 550CPSC 550

Spring 2006Spring 2006

Page 2: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

HistoryHistory

The history of modern computing can be The history of modern computing can be divided into the following eras:divided into the following eras:

1970s: Timesharing (1 computer with many users)1970s: Timesharing (1 computer with many users)

1980s: Personal computing (1 computer per user)1980s: Personal computing (1 computer per user)

1990s: Parallel computing (many computers per user)1990s: Parallel computing (many computers per user)

Page 3: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

HistoryHistory

80’s computers could be networked together and 80’s computers could be networked together and files could be shared between users RPCs. files could be shared between users RPCs. Parallel computing in the 90’s and today are Parallel computing in the 90’s and today are used to share CPU resources among a network used to share CPU resources among a network of computer systems. of computer systems. This concept is referred to as distributed This concept is referred to as distributed computer systems or parallel computing computer systems or parallel computing How can we exploit with the one-to-many How can we exploit with the one-to-many computer system configuration?computer system configuration?

AmeobaAmeoba

Page 4: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

What is AmoebaWhat is Amoeba

Amoeba is a distributed operating systemAmoeba is a distributed operating systemDeveloped by Andrew Tannenbaum Developed by Andrew Tannenbaum Uses timesharingUses timesharingUser logs into the system as a whole, not User logs into the system as a whole, not just his local machine.just his local machine.When the user runs a program, the system When the user runs a program, the system decides which machine (or machines) in decides which machine (or machines) in the system should execute it. the system should execute it. This decision is invisible to the user. This decision is invisible to the user.

Page 5: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

Design GoalsDesign Goals

The basic design goals of Amoeba are:The basic design goals of Amoeba are:

Distribution—Connecting together many machinesDistribution—Connecting together many machines

Parallelism—Allowing individual jobs to use multiple Parallelism—Allowing individual jobs to use multiple CPUs easilyCPUs easily

Transparency—Having the collection of computers act Transparency—Having the collection of computers act like a single systemlike a single system

Performance—Achieving all of the above in an efficient Performance—Achieving all of the above in an efficient mannermanner

Page 6: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

Definitions of Amoeba Definitions of Amoeba CommunicationsCommunications

The definitions of the Amoeba communication calls are given in the The definitions of the Amoeba communication calls are given in the ANSI C language. All three calls use a ANSI C language. All three calls use a Msg Msg data structure, which is data structure, which is a 32-byte header with several fields to hold a 32-byte header with several fields to hold capabilitiescapabilities and other and other items. Note that each request or reply message can consist of just a items. Note that each request or reply message can consist of just a header or a header and an additional component.header or a header and an additional component.

transtrans(Msg *requestHeader, char *requestBuffer, int requestSize, (Msg *requestHeader, char *requestBuffer, int requestSize, Msg *replyHeader, char*replyBuffer, int replySize) Msg *replyHeader, char*replyBuffer, int replySize) Client sends a Client sends a request message and receives a reply; the header contains a request message and receives a reply; the header contains a capability for the object upon which an operation is being requested.capability for the object upon which an operation is being requested.

get_requestget_request(Msg *requestHeader, char *requestBuffer, int (Msg *requestHeader, char *requestBuffer, int requestSize)requestSize)Server gets a request from the port specified in the Server gets a request from the port specified in the message header.message header.

put_replyput_reply(Msg *replyHeader, char *replyBuffer, int replySize) (Msg *replyHeader, char *replyBuffer, int replySize) Server replies.Server replies.

Page 7: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

Features in AmoebaFeatures in Amoeba

Microkernel and Server ArchitectureMicrokernel and Server Architecture Amoeba is built upon a microkernel architecture.Amoeba is built upon a microkernel architecture. The microkernel supports the basic process, The microkernel supports the basic process,

communications, and object primitives. It also communications, and object primitives. It also handles device I/O and memory management. handles device I/O and memory management.

Each machine in the Amoeba system runs a small Each machine in the Amoeba system runs a small identical software program - called the microkernel. identical software program - called the microkernel.

The function of the kernel is to allow efficient The function of the kernel is to allow efficient communication between client processes, which run communication between client processes, which run application programs, and server processes, such as application programs, and server processes, such as the Bullet File server or the directory server. the Bullet File server or the directory server.

Page 8: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

FeaturesFeatures

ThreadsThreads

Each process has its own address space and contains multiple threads. Each process has its own address space and contains multiple threads. These threads have their own stack and program counter, but share the These threads have their own stack and program counter, but share the global data and code of the process.global data and code of the process.

Remote Procedure CallsRemote Procedure Calls

RPC is the basic communication mechanism in Amoeba. Communication RPC is the basic communication mechanism in Amoeba. Communication consists of a client thread sending a message to a server thread, then consists of a client thread sending a message to a server thread, then blocking until the server thread sends back a return message, at which time blocking until the server thread sends back a return message, at which time the client is unblocked.the client is unblocked.Amoeba uses stubs to access remote services which hide the details of the Amoeba uses stubs to access remote services which hide the details of the remote services from the user. A special language in Amoeba called the remote services from the user. A special language in Amoeba called the Amoeba Interface Language (AIL) generates these stubs automatically. Amoeba Interface Language (AIL) generates these stubs automatically. The stubs will then marshal parameters and hide the communication details The stubs will then marshal parameters and hide the communication details from the user. from the user.

Page 9: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

FeaturesFeatures

Group CommunicationGroup Communication Amoeba provides a mechanism that allows all Amoeba provides a mechanism that allows all

receivers in a one-to-many configuration to receivers in a one-to-many configuration to receive a transmitted message receive a transmitted message in the same in the same orderorder. This simplifies parallel processing and . This simplifies parallel processing and distributed programming problems.distributed programming problems.

Page 10: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

Differences from Network OSDifferences from Network OS

AmoebaAmoeba Programs can execute wherever OS decides.Programs can execute wherever OS decides. No concept of host machine.No concept of host machine. Objects and Capabilities are used to manage file Objects and Capabilities are used to manage file

systems.systems.

Network OSNetwork OS Programs run locally unless specified.Programs run locally unless specified. User aware he is using a local host machine.User aware he is using a local host machine. Files are maintained and accessed from local Files are maintained and accessed from local

machine unless using a remote file system.machine unless using a remote file system.

Page 11: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

ArchitectureArchitecture

Four principle componentsFour principle components WorkstationsWorkstations Processor PoolProcessor Pool Specialized Servers (directory, file, block...)Specialized Servers (directory, file, block...) WAN GatewaysWAN Gateways

Page 12: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

ArchitectureArchitecture

Page 13: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

ArchitectureArchitecture

ObjectsObjects Abstract data types with data and behaviors. Abstract data types with data and behaviors. Amoeba primarily supports software objects, but hardware Amoeba primarily supports software objects, but hardware

objects also exist. objects also exist. Each object is managed by a server process to which RPCs can Each object is managed by a server process to which RPCs can

be sent. Each RPC specifies the object to be used, the operation be sent. Each RPC specifies the object to be used, the operation to be performed, and any parameters to be passed to be performed, and any parameters to be passed

CapabilitiesCapabilities 128-bit value object description created and returned to the 128-bit value object description created and returned to the

caller when the object is created.caller when the object is created. Subsequent operations on the object require the user to send its Subsequent operations on the object require the user to send its

capability to the server to both specify the object and prove the capability to the server to both specify the object and prove the user has permission to manipulate the object. user has permission to manipulate the object.

Capabilities are encrypted to prevent tampering. Capabilities are encrypted to prevent tampering.

Page 14: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

How to use AmoebaHow to use Amoeba

Amoeba is freewareAmoeba is freeware

It can be loaded on a LAN or University It can be loaded on a LAN or University computer systemcomputer system

Editors such as elvis, jove, ed come with Editors such as elvis, jove, ed come with the installation packagethe installation package

Compilers such as C, Pascal, Fortran 77, Compilers such as C, Pascal, Fortran 77, Basic, and Modula 2 Basic, and Modula 2

Orca - used for Parallel ProgrammingOrca - used for Parallel Programming

Page 15: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

ApplicationsApplications

UNIX emulationUNIX emulation

Parallel makeParallel make

Traveling salesmanTraveling salesman

Alpha-beta searchAlpha-beta search

Page 16: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

ApplicationsApplications

Parallel Parallel makemake Amoeba runs contains a processor pool with several processors. Amoeba runs contains a processor pool with several processors. One application for these processors in a UNIX environment is a One application for these processors in a UNIX environment is a

parallel version of make. parallel version of make. When make discovers that multiple compilations are needed, When make discovers that multiple compilations are needed,

they are run in parallel on different processors. they are run in parallel on different processors. pmakepmake was developed based on the UNIX was developed based on the UNIX makemake but with but with

additional code to handle parallelism. additional code to handle parallelism. many medium-sized files = considerable speedupmany medium-sized files = considerable speedup one large source file and many small ones = total time can one large source file and many small ones = total time can

never be smaller than the compilation time of the large one. never be smaller than the compilation time of the large one. AA speedup of about a factor of 4 over sequential makespeedup of about a factor of 4 over sequential make has has

been observed in practice on typical makefiles.been observed in practice on typical makefiles.

Page 17: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

ApplicationsApplications

The Traveling SalesmanThe Traveling Salesman The computer is given a starting location and The computer is given a starting location and

a list of cities to be visited. The idea is to find a list of cities to be visited. The idea is to find the shortest path that visits each city exactly the shortest path that visits each city exactly once, and then returns to the starting place. once, and then returns to the starting place.

Amoeba was programmed to run this Amoeba was programmed to run this application in parallel by having one pool application in parallel by having one pool processor act as coordinator, and the rest as processor act as coordinator, and the rest as slaves. slaves.

Page 18: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

The Traveling SalesmanThe Traveling SalesmanExample: the starting place is London, and the cities to be visited include Example: the starting place is London, and the cities to be visited include New York, Sydney, Nairobi, and Tokyo New York, Sydney, Nairobi, and Tokyo

The coordinator might tell the first slave to investigate all paths starting with The coordinator might tell the first slave to investigate all paths starting with London-New York, the second slave to investigate all paths starting with London-New York, the second slave to investigate all paths starting with London-Sydney, the third slave to investigate all paths starting with London-London-Sydney, the third slave to investigate all paths starting with London-Nairobi... Nairobi... All searches go on in parallel. All searches go on in parallel. When a slave is finished, it reports back to the coordinator and gets a new When a slave is finished, it reports back to the coordinator and gets a new assignment.assignment.Also, the algorithm can be applied recursively. Also, the algorithm can be applied recursively.

The first slave could allocate a processor to investigate paths starting with The first slave could allocate a processor to investigate paths starting with London-New York-Sydney, another processor to investigate London-New York-London-New York-Sydney, another processor to investigate London-New York-Nairobi, and so forth. Nairobi, and so forth.

Results show that about 75 percent of the theoretical maximum speedup Results show that about 75 percent of the theoretical maximum speedup can be achieved using this algorithm, the remaining 1/4 being lost to can be achieved using this algorithm, the remaining 1/4 being lost to communication and other overhead communication and other overhead

Page 19: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

Significance of pointsSignificance of points

Amoeba is a distributed operating system which Amoeba is a distributed operating system which successfully allows users to execute jobs transparently successfully allows users to execute jobs transparently over multiple CPUs. over multiple CPUs. It was primarily developed by Andrew Tannenbaum and It was primarily developed by Andrew Tannenbaum and others at the Vrije Universiteit Amsterdam, Netherland. others at the Vrije Universiteit Amsterdam, Netherland. Its basic design goals are – Its basic design goals are –

Distribution—Connecting together many machinesDistribution—Connecting together many machines Parallelism—Allowing individual jobs to use multiple CPUs easilyParallelism—Allowing individual jobs to use multiple CPUs easily Transparency—Having the collection of computers act like a Transparency—Having the collection of computers act like a

single systemsingle system Performance—Achieving all of the above in an efficient manner.Performance—Achieving all of the above in an efficient manner.

Page 20: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

Significance of PointsSignificance of Points

It is based on a microkernel architecture.It is based on a microkernel architecture.It uses objects to encapsulate data and processes and capabilities It uses objects to encapsulate data and processes and capabilities to describe the objects.to describe the objects.The kernel provides just three major system callsThe kernel provides just three major system callstrans(Msg *requestHeader, char *requestBuffer, int requestSize, trans(Msg *requestHeader, char *requestBuffer, int requestSize, Msg *replyHeader, char*replyBuffer, int replySize) Msg *replyHeader, char*replyBuffer, int replySize) get_request(Msg *requestHeader, char *requestBuffer, int get_request(Msg *requestHeader, char *requestBuffer, int requestSize)requestSize)put_reply(Msg *replyHeader, char *replyBuffer, int replySize) put_reply(Msg *replyHeader, char *replyBuffer, int replySize) It has proven to be successful at implementing speedup on many It has proven to be successful at implementing speedup on many common computer science algorithms including UNIX emulation, common computer science algorithms including UNIX emulation, parallel make, traveling salesman, and alpha-beta search.parallel make, traveling salesman, and alpha-beta search.

Page 21: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

SummarySummary

The Amoeba distributed operating system succeeds in overcoming The Amoeba distributed operating system succeeds in overcoming many of the hurdles faces in distributed computing. many of the hurdles faces in distributed computing.

It abstracts away the use of RPCs using stubs and is scalable It abstracts away the use of RPCs using stubs and is scalable based on available CPUs. based on available CPUs.

Although system updates seem to have stopped, the current version Although system updates seem to have stopped, the current version appears to have reached a stable point in its architectural appears to have reached a stable point in its architectural development. development.

The programming languages included with the distribution are The programming languages included with the distribution are common to most programmers and should make code creation easy common to most programmers and should make code creation easy for Amoeba applications. for Amoeba applications.

Results of application speedup and the fact that the system is freely Results of application speedup and the fact that the system is freely available make it worth evaluating at the university level. available make it worth evaluating at the university level.

Page 22: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

ReferencesReferences[1] Tanenbaum, A.S, Sharp, G.J. “The Amoeba Distributed Operating System” Online: 2006 [1] Tanenbaum, A.S, Sharp, G.J. “The Amoeba Distributed Operating System” Online: 2006 http://www.cs.vu.nl/pub/amoeba/Intro.pdfhttp://www.cs.vu.nl/pub/amoeba/Intro.pdf[2] Ramsay, M., Keigel, T., Memmer, H. “Ameoba Distributed Operating System” Online [2] Ramsay, M., Keigel, T., Memmer, H. “Ameoba Distributed Operating System” Online http://csserver.evansville.edu/~mr56/CS470/Final_Draft.pdfhttp://csserver.evansville.edu/~mr56/CS470/Final_Draft.pdf[3] Coulouris, G. Dollimore, J., Kindberg, T. [3] Coulouris, G. Dollimore, J., Kindberg, T. Distributed Systems – Concepts and Design,Distributed Systems – Concepts and Design, 1994, 1994, Online: http://www.cdk3.net/oss/Ed2/Amoeba.pdfOnline: http://www.cdk3.net/oss/Ed2/Amoeba.pdf[4] Sharp, G.J.: ‘‘The Design of a Window System for Amoeba,’’ Report IR-142, Dept. of Math. & [4] Sharp, G.J.: ‘‘The Design of a Window System for Amoeba,’’ Report IR-142, Dept. of Math. & Computer Science, Vrije Universiteit, Dec. 1987.Computer Science, Vrije Universiteit, Dec. 1987.[5] [5] The Amoeba Reference Manual Users GuideThe Amoeba Reference Manual Users Guide Vrije University of Amsterdam, 1996 Online Vrije University of Amsterdam, 1996 Online 2006: http://www.cs.vu.nl/pub/amoeba/manuals/usr.pdf2006: http://www.cs.vu.nl/pub/amoeba/manuals/usr.pdf[6] Bal, H.E., Renesse R. van, and Tanenbaum, A.S.: ‘‘Implementing Distributed Algorithms [6] Bal, H.E., Renesse R. van, and Tanenbaum, A.S.: ‘‘Implementing Distributed Algorithms Using Remote Procedure Calls,’’ Using Remote Procedure Calls,’’ Proc. 1987 National Computer ConferenceProc. 1987 National Computer Conference, pp. 499-506, June , pp. 499-506, June 1987.1987.[7] Baalbergen, E.H.: ‘‘Parallel and Distributed Compilations in Loosely Coupled systems,’’ [7] Baalbergen, E.H.: ‘‘Parallel and Distributed Compilations in Loosely Coupled systems,’’ Proc. Proc. Workshop on Large Grain Parallelism Workshop on Large Grain Parallelism , Providence, RI, Oct 1986., Providence, RI, Oct 1986.[8] Straven H. van, Renesse R. van, and Tanenbaum, A.S, “The Performance Of The Amoeba [8] Straven H. van, Renesse R. van, and Tanenbaum, A.S, “The Performance Of The Amoeba Distributed Operating System” Online: 2006 Distributed Operating System” Online: 2006 https://dare.ubvu.vu.nl/bitstream/1871/2589/1/11008.pdfhttps://dare.ubvu.vu.nl/bitstream/1871/2589/1/11008.pdf[9] Tanenbaum, A.S, et al, “Experiences with the Amoeba Distributed Operating System” Online [9] Tanenbaum, A.S, et al, “Experiences with the Amoeba Distributed Operating System” Online 2006: 2006: http://citeseer.ist.psu.edu/cache/papers/cs/6593/ftp:zSzzSzftp.sys.toronto.eduzSzpubzSzamoebahttp://citeseer.ist.psu.edu/cache/papers/cs/6593/ftp:zSzzSzftp.sys.toronto.eduzSzpubzSzamoebazSz03.pdf/tanenbaum90experiences.pdfzSz03.pdf/tanenbaum90experiences.pdf

Page 23: Amoeba Distributed Operating System Ken Baggett CPSC 550 Spring 2006

Questions?Questions?