Title: Permissionbased Distributed Mutual Exclusion: RicartAgrawala
1Permission-based Distributed Mutual Exclusion
Ricart-Agrawala Maekawa Algorithms
By Sherenaz W. Al-Haj Baddar
2Outline
- Introduction
- Experiments Setup
- Results and Analysis
- Further Elaboration
- Code snapshots features problems
- Conclusion
- References
-
3Introduction
- 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 doesnt want to enter CS
or has a lower priority request, then P sends
reply to CS Q - Else
- P queues Qs request, replies after exiting
CS - When all OTHER processes reply to P, P enters CS
4Introduction
- Maekawas Algorithm (quorums)
- Each process communicates with a limited number
of adjacent nodes (quorum). - For every two quorums p and q pnq ltgt?
- 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 Ps request. - After exiting CS, P sends release to all q
members, allowing q members to send reply to
queued requests
5Experiments Setup
- Number of nodes4-40 (before msgs get swallowed)
- Duration
- 30000 TOSSIM Clock Ticks (neither short nor
long)(PART1) - 50000-130000 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).
6Experiments 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)
7Billiard QuorumsAgrawal, Egecioglu, and Abbadi
- Assumes system nodes arranged into a 2-D grid.
- Meakawas quorum for N1/2XN1/2 grids are of size
2N1/2. - Billiard Quorums are of size 21/2 N1/2.
- Assumes number of nodes N(q2-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,jj) R(i,j)-(q-1)/2
- R(i1,j1) R(i,j)(q1)/2
- R(i1,j-1) R(i,j)(q-1)/2
- R(i-1,j-1) R(i,j)-(q1)/2
8Results AnalysisSynchronization Delay
9Results AnalysisMessage Complexity
- Message complexity RA has significantly higher
message complexity when number of nodes gt 6. As
Expected. - Unified quorum size reduces sensitivity to System
size.
10Results AnalysisResponsiveness
- According to responsiveness definition
- More nodes to contact ? More delay
- Expectation RA has SLOWER responsiveness than
MK.
11Results AnalysisResponsiveness
Two major points - MK has SLOWER
responsiveness!!! WHAT WENT WRONG??? -RAs
responsiveness less sensitive towards system size
increase (quorum size effect).
12Results AnalysisResponsiveness
- 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 ?!
13Results Analysisquorum size and message
complexity
- Larger quorum size? higher message complexity
14Results Analysisquorum size and responsiveness
- Larger quorum size ? slower responsiveness
15Further 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??
16Conclusion
- 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.
17Code SnapShot
18References
- D. Agrawal, O. Egecioglu, A. El Abbadi, "Billiard
Quorums on the Grid," Information Processsing
Letter 64 (1997) 9-16. - TOSSIM User Manual, http//deneb.cs.kent.edu/mikh
ail/classes/aos.f06/aos_tos_tutorial/tos_tutorial.
html,2006. - D. Gay, Lives, P., and Behren R.,The nesC
Language A Holistic Approach to Networked
Embedded Systems, http//nescc.sourceforge.net. - D. Gay, Lives, P., and Behren, R., nesC 1.1
Language Reference Manual David Gay, Philip
Levis, David Culler, Eric Brewer, May 2003. - TinyOs mailing Archive, http//deneb.cs.kent.edu/
mikhail/classes/aos.f06/aos_tos_tutorial/tos_tutor
ial.html