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

Slides:



Advertisements
Similar presentations
UNIVERSITY OF JYVÄSKYLÄ P2PDisCo – Java Distributed Computing for Workstations Using Chedar Peer-to-Peer Middleware Presentation for 7 th International.
Advertisements

Dr. Kalpakis CMSC 621, Advanced Operating Systems. Distributed Mutual Exclusion.
IEEE INFOCOM 2004 MultiNet: Connecting to Multiple IEEE Networks Using a Single Wireless Card.
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.
Slide 1 Client / Server Paradigm. Slide 2 Outline: Client / Server Paradigm Client / Server Model of Interaction Server Design Issues C/ S Points of Interaction.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
Introduction in algorithms and applications Introduction in algorithms and applications Parallel machines and architectures Parallel machines and architectures.
CS 582 / CMPE 481 Distributed Systems Communications.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
1 Java Networking – Part I CS , Spring 2008/9.
Concurrency CS 510: Programming Languages David Walker.
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.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
Lesson 1: Configuring Network Load Balancing
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,
Aalborg Media Lab 15-Jul-15 Java & EyesWeb Lecture 14 Java Client / Server Communication.
Distributed Systems Architecture Presentation II Presenters Rose Kit & Turgut Tezir.
1 25\10\2010 Unit-V Connecting LANs Unit – 5 Connecting DevicesConnecting Devices Backbone NetworksBackbone Networks Virtual LANsVirtual LANs.
Chapter 9 Message Passing Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere2 Introduction.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings 1.
Review: – computer networks – topology: pair-wise connection, point-to-point networks and broadcast networks – switching techniques packet switching and.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
Inter-process Communication and Coordination Chaitanya Sambhara CSC 8320 Advanced Operating Systems.
LIGO-G Z 8 June 2001L.S.Finn/LDAS Camp1 How to think about parallel programming.
Common Devices Used In Computer Networks
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.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
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.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
MIMD Distributed Memory Architectures message-passing multicomputers.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Example: Sorting on Distributed Computing Environment Apr 20,
1. I NTRODUCTION TO N ETWORKS Network programming is surprisingly easy in Java ◦ Most of the classes relevant to network programming are in the java.net.
1 Distributed Process Management Chapter Distributed Global States Operating system cannot know the current state of all process in the distributed.
1 Chapter 10 Distributed Algorithms. 2 Chapter Content This and the next two chapters present algorithms designed for loosely-connected distributed systems.
The InetAddress Class A class for storing and managing internet addresses (both as IP numbers and as names). The are no constructors but “class factory”
Shuman Guo CSc 8320 Advanced Operating Systems
Message-Passing Computing Chapter 2. Programming Multicomputer Design special parallel programming language –Occam Extend existing language to handle.
© 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.
Stacey Levine Chapter 4.1 Message Passing Communication.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
The Internet Book. Chapter 16 3 A Packet Switching System Can Be Overrun Packet switching allows multiple computers to communicate without delay. –Requires.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
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.
Chapter 16 - TCP: Software For Reliable Communication Introduction A Packet Switching System Can Be Overrun (merging highways) TCP Helps IP Guarantee Delivery.
Distributed systems. distributed systems and protocols distributed systems: use components located at networked computers use message-passing to coordinate.
Fault Tolerance (2). Topics r Reliable Group Communication.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Last Class: Introduction
A quick intro to networking
Scaling the Network: The Internet Protocol
Advanced Computer Networks
Distributed Algorithms
Background and Motivation
EECE.4810/EECE.5730 Operating Systems
Scaling the Network: The Internet Protocol
COMPUTER NETWORKS CS610 Lecture-29 Hammad Khalid Khan.
Distributed Systems (15-440)
Communication.
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: –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 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: –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