University of Illinois at Chicago

Slides:



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

CS 603 Process Synchronization: The Colored Ticket Algorithm February 13, 2002.
Chapter 12 Message Ordering. Causal Ordering A single message should not be overtaken by a sequence of messages Stronger than FIFO Example of FIFO but.
CS542 Topics in Distributed Systems Diganta Goswami.
Ricart and Agrawala’s Algorithm
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
1 Algorithms and protocols for distributed systems We have defined process groups as having peer or hierarchical structure and have seen that a coordinator.
Page 1 Mutual Exclusion* Distributed Systems *referred to slides by Prof. Paul Krzyzanowski at Rutgers University and Prof. Mary Ellen Weisskopf at University.
Synchronization in Distributed Systems
CS 582 / CMPE 481 Distributed Systems
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Distributed Snapshots –Termination detection Election algorithms –Bully –Ring.
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.
CS603 Process Synchronization February 11, Synchronization: Basics Problem: Shared Resources –Generally data –But could be others Approaches: –Model.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 12: Mutual Exclusion All slides © IG.
Distributed Mutual Exclusion Béat Hirsbrunner References G. Coulouris, J. Dollimore and T. Kindberg "Distributed Systems: Concepts and Design", Ed. 4,
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed Mutual Exclusion.
Distributed Mutex EE324 Lecture 11.
Distributed Algorithms
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.
QoS-enabled Tree-based Distributed Mutexes James Edmondson Brian Sulcer.
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.
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.
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.
Lecture 10 – Mutual Exclusion Distributed Systems.
1 Permission-based Distributed Mutual Exclusion : Ricart-Agrawala & Maekawa Algorithms By: Sherenaz W. Al-Haj Baddar.
Mutual exclusion Ludovic Henrio CNRS - projet SCALE Distributed Algorithms.
ITEC452 Distributed Computing Lecture 6 Mutual Exclusion Hwajung Lee.
Hwajung Lee. Mutual Exclusion CS p0 p1 p2 p3 Some applications are:  Resource sharing  Avoiding concurrent update on shared data  Controlling the.
Hwajung Lee. Mutual Exclusion CS p0 p1 p2 p3 Some applications are: 1. Resource sharing 2. Avoiding concurrent update on shared data 3. Controlling the.
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.
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.
Hwajung Lee. Mutual Exclusion CS p0 p1 p2 p3 Some applications are:  Resource sharing  Avoiding concurrent update on shared data  Controlling the.
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.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Oct 1, 2015 Lecture 12: Mutual Exclusion All slides © IG.
Lecture 18: Mutual Exclusion
4.5 Distributed Mutual Exclusion
Implementation of Ricart Agrawala Algorithm
Chapter 11 Coordination Election Algorithms
Mutual Exclusion Continued
Distributed Mutual Exclusion
Distributed Mutual Exclusion
Decentralized solution 1
Mutual Exclusion Problem Specifications
ITEC452 Distributed Computing Lecture 7 Mutual Exclusion
Outline Distributed Mutual Exclusion Introduction Performance measures
Mutual Exclusion CS p0 CS p1 p2 CS CS p3.
CSE 486/586 Distributed Systems Mutual Exclusion
Lecture 10: Coordination and Agreement
Synchronization (2) – Mutual Exclusion
ITEC452 Distributed Computing Lecture 7 Mutual Exclusion
Prof. Leonardo Mostarda University of Camerino
Lecture 11: Coordination and Agreement
Distributed Systems and Concurrency: Synchronization in Distributed Systems Majeed Kassis.
Distributed Mutual eXclusion
CSE 486/586 Distributed Systems Mutual Exclusion
Presentation transcript:

University of Illinois at Chicago Performance of Fair Distributed Mutual Exclusion Algorithms Kandarp Jani Ajay D. Kshemkalyani University of Illinois at Chicago

Presentation Plan Introduction to fair distributed mutual exclusion Previous fair algorithms Lamport ‘78: 3(n-1) msgs/CS Ricart-Agrawala (RA) ‘81: 2(n-1) msgs/CS Lodha-Kshemkalyani (LK) TPDS‘00: [n, 2n-1] msgs/CS Simulation expts study improvement of LK over RA Conclusion: LK has fewer messages, & lower waiting time, w/o compromising message size or other metrics

Model and Metrics Asynchronous distributed message-passing system d: time for a message hop Metrics for mutual exclusion algorithms number of messages/CS response time: Ω(2d+css) synchronization delay: Ω(d) waiting time: Ω(2d) throughput: 1/ response time fairness message size: O(1) Single request outstanding at a time

Relating CSS, λ, NCSS, wait time

Fair Mutual Exclusion Popular definition of fairness: requests must be answered in the order of their causality- based scalar clock values If clk(Req1) < clk(Req2): Req1 has higher priority If clk(Req1) = clk(Req2): Use requestors’ PIDs as tie-breaker (i.e., define a lexicographic order) Only Lamport, RA, and LK algorithms are fair

Ricart-Agrawala Algorithm (1983)

LK Algorithm (messages) REQUEST, REPLY, FLUSH messages REQUEST: contains timestamp of request REPLY, FLUSH: contain timestamp of last completed CS access by sender of message Local Request Queue (LRQ): at each process, LRQ tracks concurrent requests

LK Algorithm (concurrency set) Message overhead: 2n - |Cset| msgs/CS (n-1) REQUEST messages n - |Cset| REPLY messages 1 FLUSH message

LK algorithm (REQUEST) Multiple uses of REQUEST to seek permission to enter CS if requesting concurrently, the REQUEST acts as a REPLY from the lower priority requestor (i) to the higher priority requester (j) j remembers i’s request in its LRQ i remembers j’s request in its LRQ After j finishes CS, i will eventually get logical permission from j via a chain of REPLY and FLUSH messages

LK algorithm (REPLY) REPLY message has timestamp of last completed CS request of sender of REPLY Multiple uses of REPLY Sender gives individual permission Sender gives collective permission on behalf of all processes with higher priority requests It acts as multiple logical reply messages

LK algorithm (FLUSH) FLUSH sent after exiting CS, to the concurrently requesting process with the next highest priority FLUSH timestamped w/timestamp of just completed CS request of sender of FLUSH Multiple uses of FLUSH Sender gives individual permission Sender gives collective permission on behalf of all processes with higher priority requests It acts as multiple logical reply messages

Simulation Parameters (on OPNET) Input parameters: Number of processes : n (10-40) Inter-request time: exp. Distributed, mean λ (0.1 ms to 10 s) Critical Section Sitting time: exp. distributed, mean CSS (0.1 microsec to 10 millisec) Propagation delay: D, implicitly modeled in CSS Output parameters: Normalized message complexity: M Waiting time: T

Experiments Experiment 1: Experiment 2: Experiment 3: M = f(λ), for multiple settings of (n, CSS) Experiment 2: M = f(n), for multiple settings of (CSS, λ) Experiment 3: T = f(n), for multiple settings of (CSS, λ) compared LK and RA algorithms

Impact of λ on Msg. Ovhd (Expt 1, n=10)

Impact of λ on Msg. Ovhd (Expt 1, n=20)

Impact of λ on Msg. Ovhd (Expt 1, n=30)

Impact of λ on Msg. Ovhd (Expt 1, n=40)

Impact of n on Msg. Ovhd (Expt 2, CSS=0.1 microsec)

Impact of n on Msg. Ovhd (Expt 2, CSS=1 microsec)

Impact of n on Msg. Ovhd (Expt 2, CSS=0.1 ms)

Impact of n on Msg. Ovhd (Expt 2, CSS=1 ms)

Impact of n on Wait Time (Expt 3, CSS=1 microsec)

Impact of n on Wait Time (Expt 3, CSS=0.1 microsec)

Conclusions LK is the best known fair mutex algorithm LK outperforms Ricart-Agrawala i.t.o. Number of messages/CS Waiting time/CS without compromising message size or any other metric Studied behaviour of LK using simulations under a wide range of conditions