Distributed Algorithms

Slides:



Advertisements
Similar presentations
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Distributed Mutual Exclusion.
Advertisements

CS542 Topics in Distributed Systems Diganta Goswami.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed System Architectures.
Page 1 Mutual Exclusion* Distributed Systems *referred to slides by Prof. Paul Krzyzanowski at Rutgers University and Prof. Mary Ellen Weisskopf at University.
Shivkumar KalyanaramanRensselaer Q1-1 ECSE-6600: Internet Protocols Quiz 1 Time: 60 min (strictly enforced) Points: 50 YOUR NAME: Be brief, but DO NOT.
Reliable Networking Systems The goals: Implement a reliable network application of a file sharing network. Implement a reliable network application of.
1 Distributed Process Management: Distributed Global States and Distributed Mutual Exclusion.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
Chapter 9 Message Passing Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere2 Introduction.
Inter-process Communication and Coordination Chaitanya Sambhara CSC 8320 Advanced Operating Systems.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Spaces Dr. Samir Tartir Extracted from Principles of Concurrent and Distributed Programming, Second Edition By M. Ben-Ari.
QoS Support in High-Speed, Wormhole Routing Networks Mario Gerla, B. Kannan, Bruce Kwan, Prasasth Palanti,Simon Walton.
1 Next Few Classes Networking basics Protection & Security.
MIMD Distributed Memory Architectures message-passing multicomputers.
Example: Sorting on Distributed Computing Environment Apr 20,
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Coordination and Agreement. Topics Distributed Mutual Exclusion Leader Election.
1 Chapter 10 Distributed Algorithms. 2 Chapter Content This and the next two chapters present algorithms designed for loosely-connected distributed systems.
Shuman Guo CSc 8320 Advanced Operating Systems
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 1: Characterization of Distributed & Mobile Systems Dr. Michael R.
Distributed systems (NET 422) Prepared by Dr. Naglaa Fathi Soliman Princess Nora Bint Abdulrahman University College of computer.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
Distributed Algorithms Dr. Samir Tartir Extracted from Principles of Concurrent and Distributed Programming, Second Edition By M. Ben-Ari.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Exercises for Chapter 11: COORDINATION AND AGREEMENT
Last Class: Introduction
A quick intro to networking
Scaling the Network: The Internet Protocol
CS4470 Computer Networking Protocols
Definition of Distributed System
NET323 D: Network Protocols
Subject Name: OPERATING SYSTEMS Subject Code: 10EC65
Transport Layer Unit 5.
Chapter 17 – Introduction to Distributed Systems
Sarah Diesburg Operating Systems COP 4610
CMSC 611: Advanced Computer Architecture
Parallel and Multiprocessor Architectures – Shared Memory
NET323 D: Network Protocols
Advanced Computer Networks
Outline Distributed Mutual Exclusion Introduction Performance measures
Background and Motivation
Andy Wang Operating Systems COP 4610 / CGS 5765
Networking Theory (part 2)
Channels.
Chapter 2: Operating-System Structures
CSE 486/586 Distributed Systems Mutual Exclusion
EECE.4810/EECE.5730 Operating Systems
Principles of Concurrent and Distributed Programming, Second Edition
Abstraction.
Scaling the Network: The Internet Protocol
Channels.
Prof. Leonardo Mostarda University of Camerino
Channels.
Parallel programming in Java
COMPUTER NETWORKS CS610 Lecture-29 Hammad Khalid Khan.
Overview of Networking
Chapter 2: Operating-System Structures
Data Communication and Computer Networks
Distributed Systems (15-440)
Distributed Mutual eXclusion
CSE 486/586 Distributed Systems Mutual Exclusion
Communication.
Data Link Layer. Position of the data-link layer.
Network programming Lecture 1 Prepared by: Dr. Osama Mokhtar.
Multiprocessors and Multi-computers
Networking Theory (part 2)
Presentation transcript:

Distributed Algorithms Dr. Samir Tartir Extracted from Principles of Concurrent and Distributed Programming, Second Edition By M. Ben-Ari

Nodes and Processes A node is intended to represent a physically identifiable object like a computer. (Don’t fail) Individual computers may be running multiple processes, either by sharing a single processor or on multiple processors. We assume that the local synchronization among processes in a node is accomplished using shared-memory primitives Processes in different nodes can communicate only by sending and receiving messages.

Communications Channels Each node has a two-way channel connecting it with each other node.(Fully-connected topology) The channels deliver the messages without error, although not necessarily in the order they were sent. The transit times of messages are finite but arbitrary.

Sending and Receiving Messages send(MessageType, Destination[, Parameters]) MessageType identifies the type of the message which is sent from this node to a Destination node with optional arbitrary Parameters. receive(MessageType[, Parameters]) A message of type MessageType with optional arbitrary Parameters is received by this node. A blocking statement.

Assumption We assume atomicity of the algorithms at each process within a node. This does not apply to the critical and non-critical sections in a solution of the critical section problem, only to the pre- and postprotocols.

Practicalities Easy: Many modern languages like Ada and Java include libraries for implementing distributed systems You can even write distributed programs on a single personal computer by using a technique called loopback, where messages sent by the computer are received by the same computer without actually traversing a network Difficult: “Book-keeping” At each step, you must remember the state of each node in the network, its local data and which messages have been sent to and received from the other nodes.

Implementation - 1 Network of computers connected by a protocol that enables reliable point-to-point communications. The Transmission Control Protocol (TCP) (in LANs and on the Internet) TCP is built upon a lower-level protocol called the Internet Protocol (IP) which is used to send packets of data. The assembling of packets into messages, together with recovery from lost or damaged packets, is the responsibility of TCP.

Implementation - 2 The implementation must adapt to: E.g. Addition of nodes Removal of nodes Process distribution Heterogeneity of nodes: Computers OSs Languages E.g. RPC Java Remote Method Invocation Ada Parallel Virtual Machine Message Passing Interface (MPI) Specification

Ricart-Agrawala Two Approaches: Ticket Token passing Similar to the Bakery Algorithm Inefficient if large number of nodes. Token passing To be in CS must have the token Efficient Challenge to guarantee no deadlocks and no starvation Must pass array with each call

Ricart-Agrawala if (requestedNum < myNum) or ((requestedNum = myNum) and (source < myID)) Equivalent to: if requestedNum << myNum

RA Token-Passing requested: granted: Ticket numbers accompanying the last request messages from the other nodes granted: Tticket numbers held by each node the last time it was granted permission