CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

CS542 Topics in Distributed Systems Diganta Goswami.
CS 542: Topics in Distributed Systems Diganta Goswami.
CS3771 Today: deadlock detection and election algorithms  Previous class Event ordering in distributed systems Various approaches for Mutual Exclusion.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Lecture 8: Asynchronous Network Algorithms
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Page 1 Mutual Exclusion* Distributed Systems *referred to slides by Prof. Paul Krzyzanowski at Rutgers University and Prof. Mary Ellen Weisskopf at University.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 7 Instructor: Haifeng YU.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
1 Complexity of Network Synchronization Raeda Naamnieh.
Distributed Systems Spring 2009
CS 582 / CMPE 481 Distributed Systems
What we will cover…  Distributed Coordination 1-1.
Ordering and Consistent Cuts Presented By Biswanath Panda.
1. Explain why synchronization is so important in distributed systems by giving an appropriate example When each machine has its own clock, an event that.
Synchronization Clock Synchronization Logical Clocks Global State Election Algorithms Mutual Exclusion.
20101 Synchronization in distributed systems A collection of independent computers that appears to its users as a single coherent system.
Synchronization in Distributed Systems. Mutual Exclusion To read or update shared data, a process should enter a critical region to ensure mutual exclusion.
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Coordination in Distributed Systems Lecture # 8. Coordination Anecdotes  Decentralized, no coordination  Aloha ~ 18%  Some coordinating Master  Slotted.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Election Algorithms and Distributed Processing Section 6.5.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
CIS 720 Distributed algorithms. “Paint on the forehead” problem Each of you can see other’s forehead but not your own. I announce “some of you have paint.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo.
4.5 DISTRIBUTED MUTUAL EXCLUSION MOSES RENTAPALLI.
4.5 Distributed Mutual Exclusion Ranjitha Shivarudraiah.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo.
MUTUAL EXCLUSION AND QUORUMS CS Distributed Mutual Exclusion Given a set of processes and a single resource, develop a protocol to ensure exclusive.
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.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
Vector Clock Each process maintains an array of clocks –vc.j.k denotes the knowledge that j has about the clock of k –vc.j.j, thus, denotes the clock of.
Synchronization Chapter 5.
Event Ordering Greg Bilodeau CS 5204 November 3, 2009.
Studying Different Problems from Distributed Computing Several of these problems are motivated by trying to use solutiions used in `centralized computing’
CIS825 Lecture 2. Model Processors Communication medium.
Physical clock synchronization Question 1. Why is physical clock synchronization important? Question 2. With the price of atomic clocks or GPS coming down,
Leader Election (if we ignore the failure detection part)
Election Distributed Systems. Algorithms to Find Global States Why? To check a particular property exist or not in distributed system –(Distributed) garbage.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Hwajung Lee. Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.   i,j  V  i,j are non-faulty ::
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.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
Distributed Mutual Exclusion Synchronization in Distributed Systems Synchronization in distributed systems are often more difficult compared to synchronization.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
CS3771 Today: Distributed Coordination  Previous class: Distributed File Systems Issues: Naming Strategies: Absolute Names, Mount Points (logical connection.
CSC 8420 Advanced Operating Systems Georgia State University Yi Pan Transactions are communications with ACID property: Atomicity: all or nothing Consistency:
Revisiting Logical Clocks: Mutual Exclusion Problem statement: Given a set of n processes, and a shared resource, it is required that: –Mutual exclusion.
CIS 825 Lecture 9. Minimum Spanning tree construction Each node is a subtree/fragment by itself. Select the minimum outgoing edge of the fragment Send.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Oct 1, 2015 Lecture 12: Mutual Exclusion All slides © IG.
Coordination and Agreement
Lecture 9: Asynchronous Network Algorithms
Leader Election (if we ignore the failure detection part)
Outline Distributed Mutual Exclusion Introduction Performance measures
CSE 486/586 Distributed Systems Mutual Exclusion
Prof. Leonardo Mostarda University of Camerino
Distributed algorithms
Distributed Systems and Concurrency: Synchronization in Distributed Systems Majeed Kassis.
CIS825 Lecture 5 1.
Distributed Mutual eXclusion
Presentation transcript:

CIS 825 Review session

P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion algorithm. To make a request, a process sends the request message in the clockwise manner around the ring. When a process receives a request, it enqueues the request in its request queue (which is sorted according to the timestamps) and passes the request to the next node. A process can enter the critical section if it has received its request back (after it has gone around the ring) and its request is at the head of the queue. The release messages are also sent in the clockwise manner. There are no reply messages. Does this algorithm satisfy the properties of mutual exclusion and causal ordering (that is, if request R1 happens before R2 then R1 is served before R2).

Consider the problem in which processes need two types of accesses to the critical section: read access and write access. Two or more read accesses can be granted concurrently. However, a write access cannot be granted concurrently with a write or a read access. Modify the Lamport’s mutual exclusion algorithm to solve this problem. When a process wants to read (or write), it will send a read (write) request with the logical timestamp. The requests are queued in the timestamp order in the local queues and must be served in the timestamp order as in Lamport’s algorithm.

P2: Assume a network in which it takes at most δ seconds for each message to arrive at their destination and get processed. Consider the following algorithm for termination detection: The coordinator sends a message to all sites to detect termination. On receiving this message, each site sends its state (active or passive) to the coordinator. If the coordinator receives a passive message from all sites, it again sends a message asking “Are you still passive” after waiting for δ secs. On receiving this message, if a site has remained passive since it sent the previous message to the coordinator, it responds with a “yes” message. If the coordinator receives all “yes” responses, it declares termination. Does this algorithm detect termination correctly ? Give reasons for your answer.

Describe an algorithm to detect termination of a distribution computation on a rooted tree topology. Assume that in the computation, a node can send application messages to its parent and its children. Furthermore, the root is the initiator of the termination detection algorithm, and the communication model is asynchronous.

P3: Develop an algorithm for leader election in a mesh network of size N*N. The algorithm must be as efficient in terms of number of messages. Give the message complexity of your algorithm

Consider a network in which all sites have perfectly synchronized clocks (and all clocks tick at the same rate). The following centralized protocol can be used for mutual exclusion: The central site services the request in the order in which they arrive. It allocates each request a time period of duration slot during which the requester can access the resource. For this purpose, the central site maintains a variable, time avail. The actions of the central site on receiving a request are as follows: On receiving reqi from site i: time avail := max(time avail, local clock value); allocate the period [time avail, time avail + slot] to reqi; sends grant(time avail) to i; time avail := time avail + slot When i receives a message grant(t), it assumes that it can access the resource in the time period [t, t + slot] according to its clock. It is assumed that the maximum transmission time is less than slot. (a) Modify the protocol given above for the case in which the clocks are E-synchronized. However, it is still assumed that all clocks tick at the same rate and maximum transmission time is less than slot. Do not introduce release message in the protocol. (b) Discuss the problems that may arise in the solution to (a) if the assumption that the maximum transmission time is less than slot is removed. Modify the solution to remedy as many problems as possible

P5: Consider a set of processes arranged in a tree topology. To broadcast a message m, a node sends m to all of its neighbors. Each node, in turn, forwards m on all of its edges (except the one which m is received). Does this algorithm ensure causal ordering; that is, any two broadcast messages m1 and m2 (sent by two different processes), if send(m1) happens before send(m2) then M1 is delivered before m2 to all sites. Given convincing reasons for your answers. Assume that each edges is reliable and FIFO.

P6: Assume that you have a ring topology with each edge having a unique weight. Discuss an algorithm to construct a minimum spanning tree for this topology (do not just give the algorithm discussed in the class; if you do, you need to justify why that algorithm is the best one for this case). What is the message complexity of your algorithm? The algorithm must be efficient in terms of number of messages.