Performance of Token- based Distributed Mutual Exclusion Algorithms Scott J. McCallen Kent State University November 28 2006.

Slides:



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

CS542 Topics in Distributed Systems Diganta Goswami.
Suzuki Kasami Example. Consider 5 Sites S1 S2 S4 S3 S5 n=1 n=2 n=5 n=4 n=
Ricart and Agrawala’s Algorithm
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Concurrency Important and difficult (Ada slides copied from Ed Schonberg)
IN-NETWORK VS CENTRALIZED PROCESSING FOR LIGHT DETECTION SYSTEM USING WIRELESS SENSOR NETWORKS Presentation by, Desai, Bhairav Solanki, Arpan.
Ordering and Consistent Cuts Presented By Biswanath Panda.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Distributed Snapshots –Termination detection Election algorithms –Bully –Ring.
Synchronization Clock Synchronization Logical Clocks Global State Election Algorithms Mutual Exclusion.
CS603 Process Synchronization February 11, Synchronization: Basics Problem: Shared Resources –Generally data –But could be others Approaches: –Model.
Distributed Mutual Exclusion Béat Hirsbrunner References G. Coulouris, J. Dollimore and T. Kindberg "Distributed Systems: Concepts and Design", Ed. 4,
Synchronization Todd C. Mowry CS 740 November 1, 2000 Topics Locks Barriers Hardware primitives.
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.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed Mutual Exclusion.
Distributed Mutual Exclusion
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
1 A Mutual Exclusion Algorithm for Ad Hoc Mobile networks Presentation by Sanjeev Verma For COEN th Nov, 2003 J. E. Walter, J. L. Welch and N. Vaidya.
4.5 DISTRIBUTED MUTUAL EXCLUSION MOSES RENTAPALLI.
4.5 Distributed Mutual Exclusion Ranjitha Shivarudraiah.
QoS-enabled Tree-based Distributed Mutexes James Edmondson Brian Sulcer.
Centralized mutual exclusion Problem : What if the coordinator fails? Solution : Elect a new one.
CSC Distributed Mutual Exclusion Presenter: Weiling Li Instructor: Dr. Zhang.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
Chapter 2/6 –Critical Section Problem / Mutual exclusion progress, bounded wait –Hardware Solution disable interrupts –problems ? –Software Solution busy.
1 Distributed Process Management Chapter Distributed Global States Operating system cannot know the current state of all process in the distributed.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
Himali Saxena. Topics Configurations and Wiring Configuration implementation Basic Rules for declaration/definition Auto Wiring initialization ‘C’ and.
TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS Presented by: Shet, Deepak Rajput, Rajiv.
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’
Project 2 Presentations CS554 – Designs for Software and Systems Team HAND – Seokin Hong, Gieil Lee, Jesung Kim, Yebin Lee Department of Computer Science,
Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm Mike Yuan CS 6/73201 Advanced Operating Systems Fall 2007 Dr. Nesterenko.
1 Permission-based Distributed Mutual Exclusion : Ricart-Agrawala & Maekawa Algorithms By: Sherenaz W. Al-Haj Baddar.
CIS825 Lecture 2. Model Processors Communication medium.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion & Leader Election Steve Ko Computer Sciences and Engineering University.
Comparison of Tarry’s Algorithm and Awerbuch’s Algorithm CS 6/73201 Advanced Operating System Presentation by: Sanjitkumar Patel.
Stacey Levine Chapter 4.1 Message Passing Communication.
A Tree Based Algorithm fro Distributed Mutual Exclusion Addy Gronquist 11/19/2003.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
An Enhanced Cross-Layer Protocol for Energy Efficiency in Wireless Sensor Networks Jaehyun Kim, Dept. of Electrical & Electronic Eng., Yonsei University;
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.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
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.
Autumn 2006CSE P548 - Dataflow Machines1 Von Neumann Execution Model Fetch: send PC to memory transfer instruction from memory to CPU increment PC Decode.
Enhanced TOSSIM for Sensor Network Simulations Raju Kumar and Aditya YSV CS598C : Virtual Machines and Their Applications Spring 2006.
Token-passing Algorithms Suzuki-Kasami algorithm The Main idea Completely connected network of processes There is one token in the network. The holder.
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.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Oct 1, 2015 Lecture 12: Mutual Exclusion All slides © IG.
1 Traversal Algorithms  sequential polling algorithm  traversing connected networks (tree construction) complexity measures tree terminology tarry’s.
Implementation of Ricart Agrawala Algorithm
Distributed Computing
Mutual Exclusion Continued
Distributed Mutual Exclusion
Ultra-Low Duty Cycle MAC with Scheduled Channel Polling
Comparison between Suzuki Kasami’s and Raymond’s Tree Algorithm
Raymond'S Tree DMX Algorithm
Distributed Mutual Exclusion
Raymond Exclusive Algorithm
Outline Distributed Mutual Exclusion Introduction Performance measures
Distributed Systems and Concurrency: Synchronization in Distributed Systems Majeed Kassis.
Distributed Mutual eXclusion
Presentation transcript:

Performance of Token- based Distributed Mutual Exclusion Algorithms Scott J. McCallen Kent State University November

Token-based Algorithms A single token circulates through the system A single token circulates through the system A process wants to enter CS, it requests token A process wants to enter CS, it requests token A process gets the token, it can enter CS (in general) A process gets the token, it can enter CS (in general) Message Types Message Types Token Token Request Request

Raymond’s Token DMX Based on a tree structure Based on a tree structure Each node holds a pointer to a node that either holds the token or points to where the token is Each node holds a pointer to a node that either holds the token or points to where the token is A request is held locally and is sent through the tree until it reaches the token A request is held locally and is sent through the tree until it reaches the token Token traverses the request path until it reaches the requester Token traverses the request path until it reaches the requester

Suzuki-Kasami Token DMX Fully connected network Fully connected network Requester broadcasts requests to all other nodes with sequence number of request Requester broadcasts requests to all other nodes with sequence number of request Before sending the token, holder calculates which requests have not been satisfied and enters those into the token request queue Before sending the token, holder calculates which requests have not been satisfied and enters those into the token request queue Send token to the request at the top of the queue Send token to the request at the top of the queue

Initial Verification Experiments Setup Done to ensure correctness and begin experimentation Done to ensure correctness and begin experimentation Attributes Attributes Synchronization Delay Synchronization Delay Number of messages between each CS entry Number of messages between each CS entry Message Complexity Message Complexity Total number of messages per CS entry Total number of messages per CS entry Variables Variables Network size Network size Range from 5 to 30 for Suzuki-Kasami (why?) Range from 5 to 30 for Suzuki-Kasami (why?) Range from 5 to 60 for Raymond (why?) Range from 5 to 60 for Raymond (why?) Contention level Contention level low (sequential request/release) and high (all request/all release) low (sequential request/release) and high (all request/all release)

Suzuki-Kasami Results (Low Load)

Suzuki-Kasami Results (High Load)

Raymond Results (Low Load)

Raymond Results (High Load)

Results Summary Raymond Raymond Low Load Low Load Message Complexity : log(n)/log(2) [not log(n)/2] Message Complexity : log(n)/log(2) [not log(n)/2] Synchronization Delay : 2*log(n)/log(2) [not log(n)] Synchronization Delay : 2*log(n)/log(2) [not log(n)] High Load High Load Message Complexity : 4 Message Complexity : 4 Synchronization Delay : 2 Synchronization Delay : 2 Suzuki-Kasami Suzuki-Kasami Low Load Low Load Message Complexity : N Message Complexity : N Synchronization Delay : 1 Synchronization Delay : 1 High Load High Load Message Complexity : N Message Complexity : N Synchronization Delay: 1 Synchronization Delay: 1

Raymond’s Children Message Complexity in low load was shown to be similar to log(n)/log(2) Message Complexity in low load was shown to be similar to log(n)/log(2) In initial experiments, each node had at most 2 children In initial experiments, each node had at most 2 children How does the number of children affect the synchronization delay for Raymond’s DMX? How does the number of children affect the synchronization delay for Raymond’s DMX?

Raymond’s Children Experiment Setup Attributes Attributes Synchronization Delay Synchronization Delay Variables Variables Number of children per node Number of children per node Range from 1 to 8 (why?) Range from 1 to 8 (why?) Parameters Parameters 50 nodes in the network (why?) 50 nodes in the network (why?) 40 sequential request/releases (low contention) 40 sequential request/releases (low contention)

Results Increasing the number of children per node decreases the message complexity Increasing the number of children per node decreases the message complexity

Suzuki-Kasami Average Token Forwarding In high contention, nodes are put on the queue based on node identification In high contention, nodes are put on the queue based on node identification A token is then released to the top request on the queue A token is then released to the top request on the queue What happens when a node has the last request and what is the average of message complexity and number of token forwards before CS is allow? What happens when a node has the last request and what is the average of message complexity and number of token forwards before CS is allow?

Forwarding Experiments Setup Attributes Attributes Message Complexity + Token Forwards until CS Message Complexity + Token Forwards until CS Variables Variables Network size Network size Range from 5 to 30 by 5 Range from 5 to 30 by 5 Parameters Parameters Nodes – 1 requests Nodes – 1 requests

Suzuki-Kasami Results Based on the number of nodes in the network, the result is proportional to [(nodes*requests)+sum(1:requests)]/nodes Based on the number of nodes in the network, the result is proportional to [(nodes*requests)+sum(1:requests)]/nodes

Conclusions Raymond Raymond Better performance with many children Better performance with many children Log(n)/log(c) message complexity and sync delay Log(n)/log(c) message complexity and sync delay Suzuki Kasami Suzuki Kasami Very low sync delay Very low sync delay Steady increase in total token forwards for high contention system Steady increase in total token forwards for high contention system Neither algorithm guarantees granting CS in timestamp order Neither algorithm guarantees granting CS in timestamp order

Future Work Test systems in continuous high-contention Test systems in continuous high-contention Current experiments are all-request/all-release, continuous high- contention may produce alternate results Current experiments are all-request/all-release, continuous high- contention may produce alternate results Test Raymond’s algorithm with random tree Test Raymond’s algorithm with random tree It may not be possible to create a tree with specific children count, what results will be produced in the random case It may not be possible to create a tree with specific children count, what results will be produced in the random case Test algorithms in a real (non-random) situation Test algorithms in a real (non-random) situation Perhaps there are tree algorithms which require high-contention critical section access within a small subgraph Perhaps there are tree algorithms which require high-contention critical section access within a small subgraph Implement message piggy-backing as suggested by Raymond Implement message piggy-backing as suggested by Raymond Could reduce costs of duplicate messages for high-contention system, but should not affect low contention Could reduce costs of duplicate messages for high-contention system, but should not affect low contention

Coding the Project Problems Problems Message Size Message Size Limited the number of nodes for Suzuki-Kasami Limited the number of nodes for Suzuki-Kasami Request Queue Request Queue Incrementing length Incrementing length Added methods to check contents of queue Added methods to check contents of queue copyTokenToOut didn’t copy all information copyTokenToOut didn’t copy all information Knowing which node had the token Knowing which node had the token Required sending messages to all nodes to release Required sending messages to all nodes to release Token loss Token loss Token was lost in some tests making that test erroneous Token was lost in some tests making that test erroneous No token loss check algorithm in place for these tests No token loss check algorithm in place for these tests

Coding the Project Successes Successes Algorithms Algorithms Implementation was mostly successful Implementation was mostly successful Tython scripts Tython scripts Learning Python rather quickly Learning Python rather quickly Scripts can run arbitrary number of trials Scripts can run arbitrary number of trials Outputting results to file for access later Outputting results to file for access later Scripts can be ran unattended (except changing network size) Scripts can be ran unattended (except changing network size) MATLAB MATLAB Utilized to create graphics Utilized to create graphics

References Brewer, E., Culler, D., Gay, D., and Levis, P., nesC 1.1 Language Reference Manual, May Brewer, E., Culler, D., Gay, D., and Levis, P., nesC 1.1 Language Reference Manual, May Gay, D., Levis, P., von Behren, R., Welsh, M., Brewer, E., and Culler, D The nesC language: A holistic approach to networked embedded systems. SIGPLAN Not. 38, 5 (May. 2003), Gay, D., Levis, P., von Behren, R., Welsh, M., Brewer, E., and Culler, D The nesC language: A holistic approach to networked embedded systems. SIGPLAN Not. 38, 5 (May. 2003), Hill, J., Szewczyk, R., Woo, A., Hollar, S., Culler, D., and Pister, K System architecture directions for networked sensors. SIGOPS Oper. Syst. Rev. 34, 5 (Dec. 2000), Hill, J., Szewczyk, R., Woo, A., Hollar, S., Culler, D., and Pister, K System architecture directions for networked sensors. SIGOPS Oper. Syst. Rev. 34, 5 (Dec. 2000), Levis, P., Lee, N., Welsh, M., and Culler, D TOSSIM: accurate and scalable simulation of entire tinyOS applications. In Proceedings of the 1st international Conference on Embedded Networked Sensor Systems (Los Angeles, California, USA, November , 2003). SenSys '03. ACM Press, New York, NY, Levis, P., Lee, N., Welsh, M., and Culler, D TOSSIM: accurate and scalable simulation of entire tinyOS applications. In Proceedings of the 1st international Conference on Embedded Networked Sensor Systems (Los Angeles, California, USA, November , 2003). SenSys '03. ACM Press, New York, NY, Raymond, K A tree-based algorithm for distributed mutual exclusion. ACM Trans. Comput. Syst. 7, 1 (Jan. 1989), Raymond, K A tree-based algorithm for distributed mutual exclusion. ACM Trans. Comput. Syst. 7, 1 (Jan. 1989), Suzuki, I. and Kasami, T A distributed mutual exclusion algorithm. ACM Trans. Comput. Syst. 3, 4 (Nov. 1985), Suzuki, I. and Kasami, T A distributed mutual exclusion algorithm. ACM Trans. Comput. Syst. 3, 4 (Nov. 1985),