Principles and Paradigms Second Edition MAARTEN VAN STEEN. Processes

Similar documents
Code and Process Migration! Motivation!

Virtual machine interface. Operating system. Physical machine interface

1 Organization of Operating Systems

DB2 Connect for NT and the Microsoft Windows NT Load Balancing Service

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Distributed Systems. REK s adaptation of Prof. Claypool s adaptation of Tanenbaum s Distributed Systems Chapter 1

Principles and characteristics of distributed systems and environments

Kernel comparison of OpenSolaris, Windows Vista and. Linux 2.6

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Relational Databases in the Cloud

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Chapter 5 Cloud Resource Virtualization

Agent Languages. Overview. Requirements. Java. Tcl/Tk. Telescript. Evaluation. Artificial Intelligence Intelligent Agents

Chapter 6, The Operating System Machine Level

Globus Striped GridFTP Framework and Server. Raj Kettimuthu, ANL and U. Chicago

Operating Systems, 6 th ed. Test Bank Chapter 7

theguard! ApplicationManager System Windows Data Collector

Full and Para Virtualization

Chapter 2: OS Overview

Operating Systems. Design and Implementation. Andrew S. Tanenbaum Melanie Rieback Arno Bakker. Vrije Universiteit Amsterdam

Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Middleware for Heterogeneous and Distributed Information Systems

Operating Systems Concepts: Chapter 7: Scheduling Strategies

Example of Standard API

I/O Virtualization Using Mellanox InfiniBand And Channel I/O Virtualization (CIOV) Technology

COS 318: Operating Systems. Virtual Machine Monitors

Computer Science 4302 Operating Systems. Student Learning Outcomes

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

How To Understand The Concept Of A Distributed System

CHAPTER 2 MODELLING FOR DISTRIBUTED NETWORK SYSTEMS: THE CLIENT- SERVER MODEL

Virtual Machine Monitors. Dr. Marc E. Fiuczynski Research Scholar Princeton University

Virtual Machines.

Chapter 2 TOPOLOGY SELECTION. SYS-ED/ Computer Education Techniques, Inc.

Basics of Virtualisation

Weighted Total Mark. Weighted Exam Mark

Distributed Systems LEEC (2005/06 2º Sem.)

CS550. Distributed Operating Systems (Advanced Operating Systems) Instructor: Xian-He Sun

COMP5426 Parallel and Distributed Computing. Distributed Systems: Client/Server and Clusters

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

Network Attached Storage. Jinfeng Yang Oct/19/2015

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering

Planning the Migration of Enterprise Applications to the Cloud

Chapter 2: Remote Procedure Call (RPC)

Virtualization Technology. Zhiming Shen

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Design and Implementation of the Heterogeneous Multikernel Operating System

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

COS 318: Operating Systems. Virtual Machine Monitors

Virtualization. Types of Interfaces

Lecture 25 Symbian OS

Virtual Machines. COMP 3361: Operating Systems I Winter

Rodrigo Fernandes de Mello, Evgueni Dodonov, José Augusto Andrade Filho

independent systems in constant communication what they are, why we care, how they work

Distributed Operating Systems

Virtualization for Cloud Computing

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Chapter 3 Operating-System Structures

Virtualization. Pradipta De

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Multi-Channel Clustered Web Application Servers

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Architecture of the Kernel-based Virtual Machine (KVM)

Virtualization is set to become a key requirement

Operating System for the K computer

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Virtualization Technologies (ENCS 691K Chapter 3)

Chapter 2 Addendum (More on Virtualization)

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

Distributed Systems. Virtualization. Paul Krzyzanowski

Zend Platform TM. White Paper: Zend Download Server. By Zend Technologies, Inc. May Zend Technologies, Inc. All rights reserved.

Ad Hoc Distributed Servers. Michal Szymaniak Guillaume Pierre Mariana Simons Nikolova Maarten van Steen

The Microsoft Windows Hypervisor High Level Architecture

Multi-core Programming System Overview

First-class User Level Threads

Security Overview of the Integrity Virtual Machines Architecture

CASE STUDY: Oracle TimesTen In-Memory Database and Shared Disk HA Implementation at Instance level. -ORACLE TIMESTEN 11gR1

Performance Tuning Guidelines for PowerExchange for Microsoft Dynamics CRM

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

OpenMosix Presented by Dr. Moshe Bar and MAASK [01]

Middleware: Past and Present a Comparison

An Analysis of Container-based Platforms for NFV

An Oracle White Paper July Oracle Primavera Contract Management, Business Intelligence Publisher Edition-Sizing Guide

Recommended hardware system configurations for ANSYS users

Using NCache for ASP.NET Sessions in Web Farms

System Structures. Services Interface Structure

Part V Applications. What is cloud computing? SaaS has been around for awhile. Cloud Computing: General concepts

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

The Key Technology Research of Virtual Laboratory based On Cloud Computing Ling Zhang

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging

OSes. Arvind Seshadri Mark Luk Ning Qu Adrian Perrig SOSP2007. CyLab of CMU. SecVisor: A Tiny Hypervisor to Provide


EWeb: Highly Scalable Client Transparent Fault Tolerant System for Cloud based Web Applications

Operating System Impact on SMT Architecture

INTRODUCTION ADVANTAGES OF RUNNING ORACLE 11G ON WINDOWS. Edward Whalen, Performance Tuning Corporation

Client/Server Computing Distributed Processing, Client/Server, and Clusters

Table of Contents Introduction and System Requirements 9 Installing VMware Server 35

Transcription:

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

Processes How the different types of processes play a crucial role in distributed systems. Process : a program in execution. From an O.S. perspective, the management and scheduling of scheduling of processes are perhaps the most important issues to deal with. From an D.S. To efficiently organize client-server er systems, stems convenient to use multithreading. Using the concept of virtualization. The design issue of servers. Moving processes between different machines. Process migration or code migration. 2

Threads What a process is. How processes and threads relate. Process Table. Independent Processes. Concurrency Transparency. Switching between CPU Context. Memory Management Unit (MMU). Translation Lookaside Buffer (TLB). Swap Processes. Thread Context. Multithreading. 3

Thread Usage in Nondistributed Systems. Several benefits to multithreading gprocesses. In single-thread process, whenever a blocking system call is executed, the process as a whole is blocked. Exploit Parallelism Large Application Designed as a collection of cooperating programs. Large Context Switching. IPC in UNIX Different Parts executed by separate threads. Shared Data. Thread switching user space. Software engineering g -- structure as a collection of cooperating. 4

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

Thread Implementation Thread Advantages Package Two approaches Construct a tread library in user mode. Kernel be aware of threads and schedule them. User-level thread library Cheap to Create and Destroy threads. Switching context can be done in few instructions. Disadvantages Invocation of blocking system call will immediately block the entire process. 6

Thread Implementation Kernel- High price to pay. level Threads Every thread operation carried out by kernel requiring ii a system call. Switching contexts may now become as expensive as switching process context. Solution: Hybrid form of user-level and kernel-level threads. Lightweight Processes (LWP) Advantages. Drawback. 7

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

Threads in Distributed Systems 9

Multithreaded Clients Conceal latencies in communication. Initiate communication and do something else. Web Browsers. 10

Multithreaded Servers Exploit parallelism to attain high performance. Example file server. Dispatcher. Worker thread. 11

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

Multithreaded Servers (2) Figure 3-4. Three ways to construct a server. 13

Virtualization Single-processor illusion. Rapidly switching between threads Create illusion of parallelism. Leading to what is known as Resource Virtualization. We will discuss Virtualization. How it can be realized. 14

The Role of Virtualization in Distributed Systems Every (distributed) computer system offer an interface. Basic instruction set offered by CPU. Virtualization i deals with extending or replacing an existing i interface so as to mimic i the behavior of another system. Most important reason is to run legacy software. Become less of an issue. Then 1990 s became more favored for several reasons: Hardware and low-level system software change fast. Legacy cannot be maintained same pace. Virtualization can help by porting the legacy interface to the new platforms. Networking large Heterogeneous collection of server computers, running different application run each on different Virtual machine. 15

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. 16

Architectures of Virtual Machines (1) 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. 17

Architectures of Virtual Machines (2) 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. 18

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

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

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

CLIENTS 22

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

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

Example: The X Window System Figure 3-9. The basic organization of the X Window System. 25

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

Servers 27

General Design Issues (1) Organize Servers. ers Iterative Server. Concurrent Server. How clients contact a server End point port Using daemon. Superserver. How and whether a server can bee interrupted. Abruptly exit break connection. Out-of-band. 28

General Design Issues (2) Whether or not the server is stateless t Stateless Server: does not keep information on the state of its clients and can change its own state without having to inform any ckient. Stateful Server: maintains persistent information on its clients. Session state Permanent state. 29

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

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

Sever Clusters General Organization: Collection of machines connected through a network. Logically organized into three tires: First tier: consists of a (logical) switch through which clients requests are routed. Second tier: contain servers dedicated to application processing. Third tier: consists of data-processing servers, notably file and database servers. 32

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

Server Clusters (2) Figure 3-13. The principle of TCP handoff. 34

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

Managing g Server Clusters Example: PlanetLab Figure 3-15. The basic organization of a PlanetLab node. 36

PlanetLab (1) PlanetLab management issues: Nodes belong to different organizations. Each organization should be allowed to specify who is allowed to run applications on their nodes, And restrict resource usage appropriately. Monitoring tools available ailable assume a very specific combination of hardware and software. All tailored to be used within a single organization. Programs from different slices but running on the same node should not interfere with each other. 37

PlanetLab (2) Figure 3-16. The management relationships between various PlanetLab entities. 38

PlanetLab (3) Relationships between PlanetLab entities: A node owner puts its node under the regime of a management authority, possibly restricting usage where appropriate. A management authority provides the necessary software to add a node to PlanetLab. A service provider registers itself with a management authority, trusting it to provide wellbehaving nodes. 39

PlanetLab (4) Relationships between PlanetLab entities: A service provider contacts t a slice authority to create a slice on a collection of nodes. The slice authority needs to authenticate the service provider. A node owner provides a slice creation service for a slice authority to create slices. It essentially delegates resource management to the slice authority. A management authority delegates the creation of slices to a slice authority. 40

Code Migration 41

Reasons for Migrating g 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. 42

Models for Code Migration Code Segments. Process consist of three segments: Resource Segments. Execution Segments. 43

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

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. 45

Migration in Heterogeneous Systems Three ways to handle migration (which can be combined) Pushing memory pages to the new machine and resending the ones that are later modified during the migration process. Stopping the current virtual machine; migrate memory, and start the new virtual machine. Letting the new virtual machine pull in new pages as needed, that is, let processes start on the new virtual machine immediately and copy memory pages on demand. 46