Amoeba Objectives: to the user system should look like a single computer The computing power is located in a processor pool containing a number of CPU’s,

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Threads, SMP, and Microkernels
Chorus Vs Unix Operating Systems Overview Introduction Design Principles Programmer Interface User Interface Process Management Memory Management File.
Introduction Separate application from different supplier run on different operating systems need some higher level of coupling Application often evolve.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Macro- vs. Micro- Kernels Matthew Fluet CS614 – Advanced Systems April 5, 2001.
Amoeba -- Introduction
Chap 2 System Structures.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Using DSVM to Implement a Distributed File System Ramon Lawrence Dept. of Computer Science
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented by Alana Sweat.
Computer Systems/Operating Systems - Class 8
Ameoba Designed by: Prof Andrew S. Tanenbaum at Vrija University since 1981.
Distributed Processing, Client/Server, and Clusters
Amoeba Distributed Operating System James Schultz CPSC 550 Spring 2007.
Case Study: Distributed OS Distributed Systems, Lecture # 17.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
CS 550 Amoeba-A Distributed Operation System by Saie M Mulay.
3.5 Interprocess Communication
Figure 1.1 Interaction between applications and the operating system.
Operating Systems CS208. What is Operating System? It is a program. It is the first piece of software to run after the system boots. It coordinates the.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
©Silberschatz, Korth and Sudarshan18.1Database System Concepts Centralized Systems Run on a single computer system and do not interact with other computer.
PRASHANTHI NARAYAN NETTEM.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
The Amoeba Distributed Operating System Presented by Peter Hebden ICS 243F, Spring 2002.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Computer System Architectures Computer System Software
Chapter 4 Threads, SMP, and Microkernels Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Chapter 4 Storage Management (Memory Management).
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Processes Introduction to Operating Systems: Module 3.
Amoeba – A Distributed Operating System for the 1990s
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
Applications Use as a Program development environment-it has a partial UNIX emulation library. Most of the common library calls like open, write, close,
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
The Mach System Silberschatz et al Presented By Anjana Venkat.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Background Computer System Architectures Computer System Software.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
AMOEBA study of distributed system
CT101: Computing Systems Introduction to Operating Systems.
Introduction to Operating Systems Concepts
Chapter 3: Process Concept
Operating Systems (CS 340 D)
Chapter 2: System Structures
Chorus Distributed OS - Goals
File System Implementation
Threads, SMP, and Microkernels
The Amoeba Distributed Operating System
Lecture 4- Threads, SMP, and Microkernels
Amoeba -- Introduction
Threads Chapter 4.
Multithreaded Programming
Chapter 2: Operating-System Structures
Introduction Separate application from different supplier run on different operating systems need some higher level of coupling Application often evolve.
Outline Operating System Organization Operating System Examples
Chapter 2: Operating-System Structures
Presentation transcript:

Amoeba Objectives: to the user system should look like a single computer The computing power is located in a processor pool containing a number of CPU’s, each with its own local memory and its own network connection. There are a couple of workstations through which users access the system-for e.g. X-terminals Special servers and like file servers which need to run on specialized hardware Amoeba software consists of a micro-kernel running on each processor, and the collection of servers providing most of the traditional operating system functionality.

Micro-kernel Provides low-level memory management. Threads and allocate or de- allocate segments of memory. Threads can be kernel threads or User threads which are a part of a Process Micro-kernel provides communication between different threads regardless of the nature or location of the threads RPC mechanism is carried out via client and server stubs. All communication is RPC based in the Amoeba system

Amoeba servers Underlying concept: the services they provide: called object To create object client does an RPC with appropriate server To perform operation, the client calls the stub procedure that builds a message containing the object’s capability and then traps to kernel The kernel extracts the server port field from the capability and looks it up in the cache to locate machine on which the server resides If no cache entry is found-kernel locates server by broadcasting

Bullet server File system is a collection of server process The file system is called a bullet server (fast: hence the name) Once file is created it cannot be changed, it can be deleted and new one created in its place Sever maintains a table with one entry per file. When a client process wants to read a file it send the capability for the file to server which in turn extracts the object and finds the file using the object number

Directory Server Function: provide mapping from ASCII names to capabilities. Operation are provided to create and delete directories. The directories are not immutable and therefore new entries can be added to directory. Each file entry in the director has three protection domain User presents a directory server with a ASCII name, capability and the server then checks the capability corresponding to the name User can any one of the directory servers, if one is down it can use others

Boot Server It provides fault tolerance to the system Check if the others severs are running or not A process interested in surviving crashes registers itself with the server If a server fails to respond to the Boot server, it declares it as dead and arranges for a new processor on which the new copy of the process is started The boot server is itself replicated to guard against its own failure

Applications Use as a Program development environment-it has a partial UNIX emulation library. Most of the common library calls like open, write, close, fork have been emulated. Use it for parallel programming-The large number of processor pool make it possible to carry out processes in parallel Use it in embedded industrial application as shown in the diagram below

Future Desirable properties of Future systems Seamless distribution-system determines where computation excuet and data resides. User unaware Worldwide scalability Fault Tolerance Self Tuning-system takes decision regarding the resource allocation, replication, optimizing performance and resource usage Self configurations-new machines should be assimilated automatically Security Resource controls-users has some controls over resource location etc A Company would not want its financial documents to be stored in a location outside its network system

Goals Aggressive abstraction-application programmer should not have to worry about the mechanics of distributed programming etc but concentrate on the user’s requirements Storage irrelevance Location irrelevance Just in time binding

10 Introduction (1) Amoeba 5.0 is a a general purpose distributed operating system. The researchers were motivated by the declining cost of CPU chips. They saw the challenge of designing and implementing software to manage the growing availability of computing power in a convenient way. Their basic idea: users should not be aware of the number or location of processors, file servers, or other resources. The complete system should appear to be a single computer.

11 At the Free University in Amsterdam, Amoeba ran on a collection of 80 single-board SPARC computers connected by an Ethernet, forming a powerful processor pool. [Amoeba 1996 ] This equipment is pictured next. It is used for research in distributed and parallel operating systems, runtime systems, languages, and applications. Introduction (2)

12 Processor Pool of 80 single-board SPARC computers.

13 Design Goals (1) The four basic design goals of Amoeba were: 1. Distribution: Connecting together many machines so that multiple independent users can work on different projects. The machines need not be of the same type, and may be spread around a building on a LAN. 2. Parallelism: Allowing individual jobs to use multiple CPUs easily. For example, a branch and bound problem, such as the TSP, would be able to use tens or hundreds of CPUs. Or, one user playing chess where the CPUs evaluate different parts of the game tree.

14 3. Transparency: Having the collection of computers act like a single system. So, the user should not log into a specific machine, but into the system as a whole. 4. Performance: Achieving all of the above in an efficient manner. The basic communication mechanism should be optimized to allow messages to be sent and received with a minimum of delay. Also, large blocks of data should be moved from machine to machine at high bandwidth. Design Goals (2)

15 Architectural Models Three basic models for distributed systems: [Coulouris 1988] 1. Workstation/Server: majority as of Processor pool: users just have terminals. 3. Integrated: heterogeneous network of machines that may perform both the role of server and the role of application processor. Amoeba is an example of a hybrid system that combines characteristics of the first two models. Highly interactive or graphical programs may be run on workstations, and other programs may be run on the processor pool.

16 The Amoeba System Architecture Four basic components: 1. Each user has a workstation running X Windows (X11R6). 2. Pool of processors which are dynamically allocated to users as required. 3. Specialized servers: file, directory, database, etc. 4. These components were connected to each other by a fast LAN, and to the wide area network by a gateway.

17

18 Microkernel and Server Architecture Microkernel Architecture: every machine runs a small, identical piece of software called the kernel. The kernel supports: 1. Process, communication, and object primitives. 2. Raw device I/O, and memory management. Server Architecture: User space server processes are built on top of the kernel. Modular design: 1. For example, the file server is isolated from the kernel. 2. Users may implement a specialized file server.

19 Threads Each process has its own address space, but may contain multiple threads of control. Each thread logically has its own registers, program counter, and stack. Each thread shares code and global data with all other threads in the process. For example, the file server utilizes threads. Threads are managed and scheduled by the microkernel. Both user and kernel processes are structured as collections of threads communicating by RPCs.

20

21 Remote Procedure Calls Threads within a single process communicate via shared memory. Threads located in different processes use RPCs. All interprocess communication in Amoeba is based on RPCs. A client thread sends a message to a server thread, then blocks until the server thread replies. The details of RPCs are hidden by stubs. The Amoeba Interface Language automatically generates stub procedures.

22

23 Great effort was made to optimize performance of RPCs between a client and server running as user processes on different machines. 1.1 msec from client RPC initiation until reply is received and client unblocks.

24 Group Communication One-to-Many Communication: A single server may need to send a message to a group of cooperating servers when a data structure is updated. Amoeba provides a facility for reliable, totally-ordered group communication. All receivers are guaranteed to get all group messages in exactly the same order.

25 Objects and Capabilities (1) All services and communication are built around them. Object: an abstract data type. Each object is managed by a server process to which RPCs can be sent. Each RPC specifies the object to be used, operation to be performed, and parameters passed. During object creation, the server constructs a 128 bit value called a “capability” and returns it to the caller.

bit Capability The structure of a capability: 1. Server Port identifies the server process that manages the object. 2. Object field is used by the server to identify the specific object in question. 3. Rights field shows which of the allowed operations the holder of a capability may perform. 4. Check Field is used for validating the capability.

27 Subsequent operations on the object require the user to send its capability to the server to both specify the object and prove that the user has permission to manipulate the object. Capabilities are protected cryptographically. A new capability has all rights bits on, and this owner capability is returned to the client. This client may create a restricted capability by passing its capability and a bit mask for the new rights to the server. All objects in the entire system are protected using this scheme. Objects and Capabilities (2)

28 Given a collection of memory segments, a process p1 can go to the process server and ask for a process p2 to be constructed from them.

29 Memory Management When a process is executing, all of its segments are in memory. No swapping or paging. Amoeba can only run programs that fit in physical memory. Advantage: simplicity and high performance.

30 Software Outside the Kernel (1) Most of the traditional operating system services are implemented as server processes. Objects and capabilities provide the unifying theme. Bullet File Server: 1. Files are immutable. 2. Files are stored contiguously on disk. 3. Caches whole files contiguously in core. 4. Usually, when a user program requests a file, the Bullet server will send the entire file in a single RPC (using a single disk operation). 5. Does not handle naming. Just reads and writes files according to their capabilities.

31

32 Software Outside the Kernel (2) Directory Server: 1. File management and naming are separated. 2. The Bullet server manages files, but not naming. 3. A directory server maps ascii strings onto capabilities. 4. Directories contain (string, capability) pairs. 5. Directories are not immutable. 6. Operations for managing replicated files in a consistent way are provided.

33 One row for each filename. One column for each protection domain: user, group, others.

34 Software Outside the Kernel (3) Additional software outside the kernel includes: 1. Compilers: C, Pascal, Modula 2, BASIC, and Fortran. 2. Orca for parallel programming. 3. Utilities modeled after UNIX commands. 4. UNIX emulation. 5. TCP/IP for Internet access. 6. X Windows. 7. Driver for linking into a SunOS UNIX kernel. 8. Boot server: provides a degree of fault tolerance. a) Polls server processes. b) If no reply, allocates new pool processor where a new copy is started.

35 Conclusions: 4.0 After more than eight years of development and use, the researchers assessed Amoeba. [Tanenbaum 1990] Among the things done right were: 1. Basing the system on objects. 2. Using a single uniform mechanism (capabilities) for naming and protecting objects in a location independent way. 3. Designing a new, very fast file system. Among the things done wrong were: 1. Not allowing preemption of threads. 2. Initially building a window system instead of using X Windows. 3. Not having multicast from the outset.

36 Conclusions: 5.0 In a Status Report [Tanenbaum 1991], the researchers concluded: 1. Amoeba has demonstrated that it is possible to build a efficient, high performance distributed operating system. 2. The microkernel architecture allows the system to evolve as needed. 3. Objects and capabilities provide a unifying theme. 4. Amoeba is a work in progress.

37 [Coulouris 1988] Coulouris, George F., Dollimore, Jean: Distributed Systems: Concepts and Design, 1988 [Tanenbaum 1990] Tanenbaum, A.S., Renesse, R. van, Staveren, H. van., Sharp, G.J., Mullender, S.J., Jansen, A.J., and Rossum, G. van: "Experiences with the Amoeba Distributed Operating System," Commun. ACM, vol. 33, pp , Dec [Tanebaum 1991] Tanenbaum, A.S., Kaashoek, M.F., Renesse, R. van, and Bal, H.: "The Amoeba Distributed Operating System-A Status Report," Computer Communications, vol. 14, pp , July/August [Amoeba 1996] The Amoeba Distributed Operating System, References

Chorus Distributed OS - Goals Research Project in INRIA (1979 – 1986) Separate applications from different suppliers running on different operating systems need some higher level of coupling Applications often evolve by growing in size leading to distribution of programs to different machines need for a gradual on-line evolution Applications grow in complexity need for modularity of the application to be be mapped onto the operating system concealing the unnecessary details of distribution from the application

Chorus – Basic Architecture Nucleus There is a general nucleus running on each machine Communication and distribution are managed at the lowest level by this nucleus CHORUS nucleus implements the real time required by real time applications Traditional operating systems like UNIX are built on top of the Nucleus and use its basic services.

Chorus versions Chorus V0 (Pascal implementation) Actor concept - Alternating sequence of indivisible execution and communication phases Distributed application as actors communicating by messages through ports or groups of ports Nucleus on each site Chorus V1 Multiprocessor configuration Structured messages, activity messages Chorus V2, V3 (C++ implementation) Unix subsystem (distant fork, distributed signals, distributed files)

Nucleus Architecture

Chorus Nucleus Supervisor(machine dependent) dispatches interrupts, traps and exception given by hardware Real-time executive controls allocation of processes and provides synchronization and scheduling Virtual Memory Manager manipulates the virtual memory hardware and and local memory resources. It uses IPC to request remote date in case of page fault IPC manager provides asynchronous message exchange and RPC in a location independent fashion. Version V3 onwards, the actors, RPC and ports management were made a part of the Nucleus functions

Chorus Architecture The Subsystems provide applications with with traditional operating system services Nucleus Interface Provides direct access to low-level services of the CHORUS Nucleus Subsystem Interface e.g.. UNIX emulation environment, CHORUS/MiX Thus, functions of an operating system are split into groups of services provided by System Servers (Subsystems) User libraries – e.g. “C”

System servers work together to form what is called the subsystem The Subsystem interface – implemented as a set of cooperating servers representing complex operating system abstractions Note: the Nucleus interface Abstractions in the Chorus Nucleus Actor-collection of resources in a Chorus System. It defines a protected address space. Three types of actors-user(in user address space), system and supervisor Thread Message (byte string addressed to a port) Port and Port Groups- A port is attached to one actor and allows the threads of that Actor to receive messages to that port Region Actors, port and port groups have UIs Chorus Architecture (cont.)

Actors * trusted if the Nucleus allows to it perform sensitive Nucleus Operations * privileged if allowed to execute privileged instructions. User actors - not trusted and not privileged System actors - trusted but not privileged Supervisor actor – trusted and privileged

Actors,Threads and Ports A site can have multiple actors Actor is tied to one site and its threads are always executed on that site Physical memory and data of the thread on that site only Neither Actors nor threads can migrate to other sites. Threads communicate and synchronize by IPC mechanism However, threads in an actor share an address space can use shared memory for communication An Actor can have multiple ports. Threads can receive messages on all the ports. However a port can migrate from one actor to another Each Port has a logical and a unique identifier

Regions and Segments An actors address is divided into Regions A region of of an actor’s address space contains a portion of a segment mapped to a given virtual address. Every reference to an address within the region behaves as a reference to the mapped segment The unit of information exchanged between the virtual memory system and the data providers is the segment Segments are global and are identified by capabilities(a unit of data access control) A segment can be accessed by mapping (carried by Chorus IPC) to a region or by explicitly calling a segment_read/write system call

Messages and Ports A message is a contiguous byte string which is logically copied from the sender’s address space to the receiver’s address space Using coupling between large virtual memory management and IPC large messages can be transferred using copy-on-write techniques or by moving page descriptors Messages are addressed to PoRts and not to actors. The port abstraction provides the necessary decoupling of the interface of a service and its implementation When a port is created the Nucleus returns both a local identifier and a Unique Identifier (UI) to name the port

Port and Port Groups Ports are grouped into Port Groups When a port group is created it is initially empty and ports can be added or deleted to it. A port can be a part of more than one port group Port groups also have a UIs

Segment representation within a Nucleus Nucleus manages a per-segment local cache of physical pages Cache contains pages obtained from mappers which is used to fulfill requests of the same segment data Algorithms are required for the consistency of the cache with the original copies Deferred copy techniques is used whereby the Nucleus uses the memory management facilities to avoid performing unnecessary copy operations

Chorus Subsystem A set of chorus actors that work together to export a unified application programming interface are know as subsystems Subsystems like Chorus/MiX export a high-level operating system abstractions such as process objects, process models and data providing objects A portion of a subsystem is implemented as a system actor executing in system space and a portion is implemented as user actor Subsystem servers communicate by IPC A subsystem is protected by means of system trap interface

CHORUS/MiX: Unix Subsystem Objectives: implement UNIX services, compatibility with existing application programs, extension to the UNIX abstraction to distributed environment, permit application developers to implement their own services such as window managers The file system is fully distributed and file access is location independent UNIX process is implemented as an Actor Threads are created inside the process/actor using the u_thread interface. Note: these threads are different from the ones provided by the nucleus Signals to are either sent to a particular thread or to all the threads in a process

Unix Server Each Unix Server is implemented as an Actor It is generally multithreaded with each request handled by a thread Each server has one or more ports to which clients send requests To facilitate porting of device drivers from a UNIX kernel into the CHORUS server, a UNIX kernel emulation emulation library library is developed which is linked with the Unix device driver code. Several types of servers can be distinguished in a subsystem: Process Manager(PM), File Manager (FM), Device Manager (DM) IPC Manager (IPCM)

Chorus/Mix: Unix with chorus

Process Manager(PM) It maps Unix process abstractions onto CHORUS abstractions It implements entry points used by processes to access UNIX services For exec, kill etc the PM itself satisfies the request For open, close, fork etc it invokes other subsystem servers to handle the request PM accesses the Nucleus services through the system calls For other services it uses other interfaces like File manager, Socket Manager, Device Manager etc

UNIX process A Unix process can be view as single thread of control mapped into a single chorus actor whose Unix context switch is managed by the Process Manager PM also attaches control port to each Unix process actor. A control thread is dedicated to receive and process all messages on this port For multithreading the UNIX system context switch is divide into two subsystems: process context and u_thread context

Unix process as a Chorus Actor

File Manager (FM) It provides disk level UNIX file system and acts as mappers to the Chorus Nucleus FM implements services required by CHORUS virtual memory management such as backing store.