190 likes | 583 Views
Permission-based Distributed Mutual Exclusion : Ricart-Agrawala & Maekawa Algorithms. By: Sherenaz W. Al-Haj Baddar. Outline. Introduction Experiments Setup Results and Analysis Further Elaboration Code snapshots: features & problems Conclusion References. Introduction.
E N D
Permission-based Distributed Mutual Exclusion: Ricart-Agrawala &Maekawa Algorithms By: Sherenaz W. Al-Haj Baddar
Outline • Introduction • Experiments Setup • Results and Analysis • Further Elaboration • Code snapshots: features & problems • Conclusion • References
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
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
Experiments Setup • Number of nodes:4-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).
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)
Billiard QuorumsAgrawal, Egecioglu, and Abbadi • Assumes system nodes arranged into a 2-D grid. • Meakawa’s 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,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
Results & AnalysisMessage Complexity • Message complexity: RA has significantly higher message complexity when number of nodes >= 6. As Expected. • Unified quorum size reduces sensitivity to System size.
Results & AnalysisResponsiveness • According to responsiveness definition: • More nodes to contact More delay • Expectation: RA has SLOWER responsiveness than MK….
Results & AnalysisResponsiveness Two major points: - MK has SLOWER responsiveness!!! WHAT WENT WRONG??? -RA‘s responsiveness less sensitive towards system size increase (quorum size effect).
Results & 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 ?!
Results & Analysisquorum size and message complexity • Larger quorum size higher message complexity
Results & Analysisquorum size and responsiveness • Larger quorum size slower responsiveness
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??
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.
References • 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/~mikhail/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_tutorial.html