1 Permission-based Distributed Mutual Exclusion : Ricart-Agrawala & Maekawa Algorithms By: Sherenaz W. Al-Haj Baddar.

Slides:



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

Ricart and Agrawala’s Algorithm
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.
Synchronization in Distributed Systems
Enforcing Mutual Exclusion Message Passing. Peterson’s Algorithm for Processes P0 and P1 void P0() { while( true ) { flag[ 0 ] = false; /* remainder */
CS 582 / CMPE 481 Distributed Systems
Ordering and Consistent Cuts Presented By Biswanath Panda.
Highly Concurrent and Fault-Tolerant h-out of-k Mutual Exclusion Using Cohorts Coteries for Distributed Systems.
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.
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
20101 Synchronization in distributed systems A collection of independent computers that appears to its users as a single coherent system.
A Fault-Tolerant h-out of-k Mutual Exclusion Algorithm Using Cohorts Coteries for Distributed Systems Presented by Jehn-Ruey Jiang National Central University.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 12: Mutual Exclusion All slides © IG.
1 Distributed Process Management: Distributed Global States and Distributed Mutual Exclusion.
TOSSIM: Visualizing the Real World Philip Levis, Nelson Lee, Dennis Chi and David Culler UC Berkeley NEST Retreat, January 2003.
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.
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.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed Mutual Exclusion.
Distributed Mutex EE324 Lecture 11.
Performance of Token- based Distributed Mutual Exclusion Algorithms Scott J. McCallen Kent State University November
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
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.
1 Chapter 10 Distributed Algorithms. 2 Chapter Content This and the next two chapters present algorithms designed for loosely-connected distributed systems.
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.
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’
Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm Mike Yuan CS 6/73201 Advanced Operating Systems Fall 2007 Dr. Nesterenko.
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)
1.Mutual Exclusion in Distributed Systems 2.Non-Token-Based Algorithms 3.Token-Based Algorithms 4.Distributed Election 5.The Bully and the Ring-Based Algorithms.
Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.
An Efficient and Fault-Tolerant Solution for Distributed Mutual Exclusion by D. Agrawal, A.E. Abbadi Presentation by Peter Tsui for COEN 317, F/03.
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.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Operating Systems CMPSC 473 Signals, Introduction to mutual exclusion September 28, Lecture 9 Instructor: Bhuvan Urgaonkar.
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.
Maekawa: Quorum Size Research Jeremy Miller Kent State University November 28 th,
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
Synchronization in Distributed Systems Chapter 6.3.
Decentralized solution 1
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
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:
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Oct 1, 2015 Lecture 12: Mutual Exclusion All slides © IG.
Mutual Exclusion Continued
Distributed Mutual Exclusion
Distributed Mutex EE324 Lecture 11.
Leader Election (if we ignore the failure detection part)
Comparison between Suzuki Kasami’s and Raymond’s Tree Algorithm
Raymond'S Tree DMX Algorithm
Decentralized solution 1
Raymond Exclusive Algorithm
Mutual Exclusion Problem Specifications
Outline Distributed Mutual Exclusion Introduction Performance measures
Mutual Exclusion CS p0 CS p1 p2 CS CS p3.
Synchronization (2) – Mutual Exclusion
Distributed Mutual eXclusion
Advanced Operating System Maekawa vs. Ricart-Agrawala By Rizal M Nor
University of Illinois at Chicago
Presentation transcript:

1 Permission-based Distributed Mutual Exclusion : Ricart-Agrawala & Maekawa Algorithms By: Sherenaz W. Al-Haj Baddar

2 Outline Introduction Experiments Setup Results and Analysis Further Elaboration Code snapshots: features & problems Conclusion References

3 Introduction Permission-based DMX:  Accessing Critical Section (CS), via gaining permission from some(or all) other processes in the system. Ricart-Agrawala Algorithm(RA):  Process requires permission from all OTHER processes in the system.  If a process P receives a request to enter CS from process Q, while it doesn’t want to enter CS or has a lower priority request, then P sends reply to CS Q  Else P queues Q’s request, replies after exiting CS  When all OTHER processes reply to P, P enters CS

4 Introduction Maekawa’s Algorithm (quorums):  Each process communicates with a limited number of adjacent nodes (quorum).  For every two quorums p and q : p∩q <>Ф  When P wants to enter CS it gains permission from all q members  Quorum member Q, has one permission to give, if given, then queue P’s request.  After exiting CS, P sends release to all q members, allowing q members to send reply to queued requests

5 Experiments Setup Number of nodes:4-40 (before msgs get swallowed) Duration:  TOSSIM Clock Ticks (neither short nor long)(PART1)  TOSSIM Clock Ticks (neither short nor long)(PART2) Metrics considered:  Synchronization delay  Message complexity  Responsiveness: the amount of time that elapses since P requests CS until it enters it for the first time. record system time (getLow32(), SimpleTimeInterface), after initiating request to CS record system time just after entering CS accumulate the difference in some global variable. Assuming LL (msgs being swallowed) Delay Timers were used to control the frequency and duration of accessing CS (basically, every 1024 Tick).

6 Experiments Setup RA algorithm:  Fully connected topology: CS requests broadcasted, replies unicasted MK algorithm:  Assumes a connected topology(as long as quorum members can access each other)  In TOSSIM: the underlying Topology is Fully Connected  Quorum formation: Using Billiard Quorums…  Number of nodes Quorum size 4,6,8  3 10,12  5 24,28  7 34,40  9 With elaboration on the relationship between quorum size and msg complexity & responsiveness)

7 Billiard Quorums Agrawal, Egecioglu, and Abbadi Assumes system nodes arranged into a 2-D grid. Meakawa’s quorum for N 1/2 XN 1/2 grids are of size 2N 1/2. Billiard Quorums are of size 2 1/2 *N 1/2. Assumes number of nodes N=(q 2 -1)/2 and assumes that q is odd (maintain symmetry). Let P be located in cell(i,j), and denoted by R(i,j) then its quorum members can be found along the lines: R(i-1,j+j) = R(i,j)-(q-1)/2 R(i+1,j+1)= R(i,j)+(q+1)/2 R(i+1,j-1)= R(i,j)+(q-1)/2 R(i-1,j-1)= R(i,j)-(q+1)/2

8 Results & Analysis Synchronization Delay

9 Results & Analysis Message Complexity Message complexity: RA has significantly higher message complexity when number of nodes >= 6. As Expected. Unified quorum size reduces sensitivity to System size.

10 Results & Analysis Responsiveness According to responsiveness definition:  More nodes to contact  More delay  Expectation: RA has SLOWER responsiveness than MK….

11 Results & Analysis Responsiveness Two major points: - MK has SLOWER responsiveness!!! WHAT WENT WRONG??? -RA‘s responsiveness less sensitive towards system size increase (quorum size effect).

12 Results & Analysis Responsiveness The unexpected behavior is due to the nature of the implementation environment. To communicate with everybody else, in RA, mote sends one sndMsg.send to the broadcast address, if returns true, then responsiveness timing starts. To communicate with your quorum Q, you are supposed to send a unicast message to each quorum member, after all contacted successfully (request initiated successfully), then responsiveness timing starts. To overcome this anomaly:  Start measuring responsiveness after contacting first member (semantics not exact).  Broadcast requests, ignore request when necessary(back to RA!!  Use a platform that supports multicast ?!

13 Results & Analysis quorum size and message complexity Larger quorum size  higher message complexity

14 Results & Analysis quorum size and responsiveness Larger quorum size  slower responsiveness

15 Further Elaboration Overcome message loss due to high contention to be able to measure pure HL. Implement the DL free version of MK (extra msg loss &overhead). Investigate the issue of assigning quorum members such that DL possibility is reduced (i.e. NO DL implementation). Extend these two algorithms for Multi-hop networks?? Extend these two algorithms for generalized DMX scenarios??

16 Conclusion Permission based DMX induce relatively high message complexity. Permission based DMX induce relatively low synchronization overhead. Permission based DMX exhibit less sensitivity to system load. RA has higher message complexity and lower synchronization delay than MK RA is supposed to have slower responsiveness than MK. However, the implementation platform may enforce different sort of relations. Larger quorum size  slower responsiveness and higher msg complexity.

17 Code SnapShot

18 References D. Agrawal, O. Egecioglu, A. El Abbadi, "Billiard Quorums on the Grid," Information Processsing Letter 64 (1997) TOSSIM User Manual, _tutorial.html, _tutorial.html,2006 D. Gay, Lives, P., and Behren R.,The nesC Language: A Holistic Approach to Networked Embedded Systems, D. Gay, Lives, P., and Behren, R., nesC 1.1 Language Reference Manual David Gay, Philip Levis, David Culler, Eric Brewer, May TinyOs mailing Archive, _tutorial.html