DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S

Slides:



Advertisements
Similar presentations
Threads, SMP, and Microkernels
Advertisements

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 9 Distributed Systems Architectures Slide 1 1 Chapter 9 Distributed Systems Architectures.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Processes: Code Migration Chapter 3 Will Cameron CSC 8530 Dr. Schragger.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Managing Server.
 Introduction Originally developed by Open Software Foundation (OSF), which is now called The Open Group ( Provides a set of tools and.
Describe the concept of lightweight process (LWP) and the advantages to using LWPs Lightweight process (LWP) lies in a hybrid form of user-level & kernel-level.
Distributed Systems Architectures
1 DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 3 Processes Skip
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Threads Clients Servers Code Migration Software Agents Summary
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
3.5 Interprocess Communication
Centralized Architectures
Processes After today’s lecture, you are asked to know The basic concept of thread and process. What are the advantages of using multi-threaded client.
EEC-681/781 Distributed Computing Systems Lecture 8 Wenbing Zhao Cleveland State University.
Processes. Communication takes place between processes. But, what’s a process? “A program in execution” Traditional operating systems: concerned with.
Processes After today’s lecture, you are asked to know The basic concept of thread and process. What are the advantages of using multi-threaded client.
Processes After today’s lecture, you are asked to know The basic concept of thread and process. What are the advantages of using multi-threaded client.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
.NET Mobile Application Development Introduction to Mobile and Distributed Applications.
Give an example to show the advantages to using multithreaded Clients See page 142 of the core book (Tanebaum 2002).
Processes.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 1.
MULTICOMPUTER 1. MULTICOMPUTER, YANG DIPELAJARI Multiprocessors vs multicomputers Interconnection topologies Switching schemes Communication with messages.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Processes Part I Processes & Threads* *Referred to slides by Dr. Sanjeev Setia at George Mason University Chapter 3.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Processes, Threads and Virtualization
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Processes Chapter 3. Table of Contents Multithreading Clients and Servers Code Migration Software Agents (special topic)
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 4 – Thread Concepts Outline 4.1 Introduction 4.2Definition of Thread 4.3Motivation for.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Architectures.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Chapter 8-2 : Multicomputers Multiprocessors vs multicomputers Multiprocessors vs multicomputers Interconnection topologies Interconnection topologies.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved RPC Tanenbaum.
OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002.
Processes. Processes and threads Process forms a building block in distributed systems Processes granularity is not sufficient for distributed systems.
Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.
Distributed Systems Principles and Paradigms Chapter 03 Processes 00 – 1.
Computer Science Lecture 7, page 1 CS677: Distributed OS Multiprocessor Scheduling Will consider only shared memory multiprocessor Salient features: –One.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Thread Usage.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Operating Systems: Internals and Design Principles
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Acknowledgement: These slides are adapted from slides provided in Thißen & Spaniol's course Distributed Systems and Middleware, RWTH Aachen Processes Distributed.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Data Communications and Networks Chapter 9 – Distributed Systems ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
CSC 480 Software Engineering Lecture 17 Nov 4, 2002.
Processes, Threads and Virtualization Chapter The role of processes in distributed systems.
Background Computer System Architectures Computer System Software.
Processes Chapter 3. Processes in Distributed Systems Processes and threads –Introduction to threads –Distinction between threads and processes Threads.
SERVERS. General Design Issues  Server Definition  Type of server organizing  Contacting to a server Iterative Concurrent Globally assign end points.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Processes Chapter 3.
Definition of Distributed System
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Processes Chapter 3.
Distributed Computing Systems
Prof. Leonardo Mostarda University of Camerino
Processes Chapter 3.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Processes Chapter 3.
Presentation transcript:

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 3 Processes

Processes OS support Multithreading Virtualization Client-server organization Process migration

Threads an OS creates a number of virtual processors . . . concurrency transparency . . . thread context

Thread Usage in Nondistributed Systems single threaded system - blocking system call multi threaded system - blocking system call - parallelism in multiprocessor systems

Thread Usage in Nondistributed Systems Figure 3-1. Context switching as the result of IPC.

Thread Implementation thread package two approaches to implementation - thread library that is executed entirely in user mode - implementing threads in the kernel hybrid form of user-level and kernel-level threads

Thread Implementation Figure 3-2. Combining kernel-level lightweight processes and user-level threads.

Threads in Distributed Systems Multithreaded Clients Multithreaded Servers

Multithreaded Servers Figure 3-3. A multithreaded server organized in a dispatcher/worker model.

Multithreaded Servers single threaded process

Multithreaded Servers Figure 3-4. Three ways to construct a server.

Virtualization resource virtualization

The Role of Virtualization in Distributed Systems every computer systems offers a programming interface to higher level software

The Role of Virtualization in Distributed Systems Figure 3-5. (a) General organization between a program, interface, and system. (b) General organization of virtualizing system A on top of system B.

The Role of Virtualization in Distributed Systems supporting legacy software Networking – the diversity of platforms and machines can be reduced

Architectures of Virtual Machines Interfaces at different levels An interface between the hardware and software consisting of machine instructions that can be invoked by any program. An interface between the hardware and software, consisting of machine instructions that can be invoked only by privileged programs, such as an operating system.

Architectures of Virtual Machines Interfaces at different levels An interface consisting of system calls as offered by an operating system. An interface consisting of library calls generally forming what is known as an application programming interface (API). In many cases, the aforementioned system calls are hidden by an API.

Architectures of Virtual Machines Figure 3-6. Various interfaces offered by computer systems.

Architectures of Virtual Machines virtualization - two different ways - process virtual machine - virtual machine monitor (VMM) First, we can build a runtime system that essentially provides an abstract instruction set that is to be used for executing applications. An alternative approach is to provide a system that is implemented as a layer completely shielding the original hardware, but offering the complete instruction set of that same (or other hardware) as an interface.

Architectures of Virtual Machines Figure 3-7. (a) A process virtual machine, with multiple instances of (application, runtime) combinations.

Architectures of Virtual Machines Figure 3-7. (b) A virtual machine monitor, with multiple instances of (applications, operating system) combinations.

Architectures of Virtual Machines VMMs will become increasingly important in the context of reliability and security for (distributed) systems. First, we can build a runtime system that essentially provides an abstract instruction set that is to be used for executing applications. An alternative approach is to provide a system that is implemented as a layer completely shielding the original hardware, but offering the complete instruction set of that same (or other hardware) as an interface.

Clients A major task of client machines is to provide the means for users to interact with remote servers. Networked User Interfaces - for each remote service the client machine will have a separate counterpart that can contact the service over the network. - provide direct access to remote services by only offering a convenient user interface. (thin-client approach)

Networked User Interfaces (1) Figure 3-8. (a) A networked application with its own protocol.

Networked User Interfaces (2) Figure 3-8. (b) A general solution to allow access to remote applications.

Client-Side Software for Distribution Transparency A client should not be aware that it is communicating with remote processes. - Access transparency - handled through the generation of a client stub. - There are different ways to handle location, migration, and relocation transparency. - Many distributed systems implement replication transparency by means of client-side solutions. Using a convenient naming system is crucial

Client-Side Software for Distribution Transparency Figure 3-10. Transparent replication of a server using a client-side solution.

Servers General Design Issues There are several ways to organize servers - iterative server - concurrent server Where clients contact a server? End point There are many services that do not require a preassigned end point.

Servers - General Design Issues Figure 3-11. (a) Client-to-server binding using a daemon.

Servers - General Design Issues It is common to associate an end point with a specific service. However, actually implementing each service by means of a separate server may be a waste of resources.

Servers - General Design Issues Figure 3-11. (b) Client-to-server binding using a superserver.

Servers - General Design Issues Another issue is whether and how a server can be interrupted. Several ways: - user abruptly exits the client application - A much better approach - send out-of-band data (data that is to be processed by the server before any other data from that client) A final, important design issue - whether or not the server is stateless. - soft state - a stateful server maintains persistent information on its clients.

Servers - General Design Issues Distinction between session state and permanent state cookie

Server Clusters General Organization A collection of machines connected through a network, where each machine runs one or more servers. In most cases, a server cluster is logically organized into three tiers

Server Clusters Figure 3-12. The general organization of a three-tiered server cluster.

Server Clusters When a server cluster offers multiple services, it may happen that different machines run different application servers. An important design goal for server clusters - hide the fact that there are multiple servers.

Figure 3-13. The principle of TCP handoff. Server Clusters Figure 3-13. The principle of TCP handoff.

Distributed Servers Most server clusters offer a single access point. When that point fails, the cluster becomes unavailable. - several access points can be provided

Distributed Servers Having a long-living access point, is a desirable feature. This observation has lead to a design of a distributed server - dynamically changing set of machines - with varying access points - but appears to the outside world as a single powerful machine.

Distributed Servers How can a stable access point can be achieved in such a system? Main idea - make use of available networking services - mobility support for IP version 6 (MIPv6). MIPv6 - mobile node, home network, home address (HoA), home agent, care-of address (CoA) This principle can be used to offer a stable address for a distributed server - a single unique contact address is assigned to the server cluster.

Distributed Servers This configuration makes the home agent and the access point a potential bottleneck. This situation can be avoided - by using an MIPv6 feature known as route optimization. Route optimization can be used to make different clients believe they are communicating with a single server.

Figure 3-14. Route optimization in a distributed server. Distributed Servers Figure 3-14. Route optimization in a distributed server.

Code Migration Reasons for Migrating Code - Load distribution algorithms - minimize communication (modern distbd systems) - exploiting parallelism (mobile agent) - becomes possible to dynamically configure distributed systems Suppose a server implements a standardized interface to a file system. To allow remote clients to access the file system, the server makes use of a proprietary protocol.

Reasons for Migrating Code Figure 3-17. The principle of dynamically configuring a client to communicate to a server. The client first fetches the necessary software, and then invokes the server.

Code Migration The important advantage of dynamically downloading clientside software - clients need not have all the software preinstalled to talk to servers. Many disadvantages - security.

Models for Code Migration A process consists of three segments: - code segment - resource segment - execution segment Weak mobility – transfer only code segment Strong mobility – transfer code segment + execution segment

Models for Code Migration Sender-initiated migration Receiver-initiated migration - simpler Weak mobility - whether migrated code is executed by the target process, or whether a separate process is started? Strong mobility can also be supported by remote cloning. Cloning yields an exact copy of the original process, but now running on a different machine.

Models for Code Migration Figure 3-18. Alternatives for code migration.

Migration and Local Resources Resource segment – cannot always be simply transferred without being changed Process-to-resource bindings - binding by identifier (strongest) - binding by value - binding by type (weakest)

Migration and Local Resources When migrating code, we often need to change the references to resources, without affecting the kind of process-to-resource binding. Resource-to-machine bindings - unattached resource - fastened resource - fixed resource

Migration and Local Resources Figure 3-19. Actions to be taken with respect to the references to local resources when migrating code to another machine.