Unformatted text preview: Performance of Token Performance of Token based Distributed Mutual Exclusion Algorithms
Scott J. McCallen Kent State University November 28 2006 Tokenbased Algorithms Tokenbased Algorithms A single token circulates through the system A process wants to enter CS, it requests token A process gets the token, it can enter CS (in general) Message Types
Token Request Raymond’s Token DMX Raymond’s Token DMX 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 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 SuzukiKasami Token DMX SuzukiKasami Token DMX Fully connected network 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 Send token to the request at the top of the queue Done to ensure correctness and begin experimentation Attributes Initial Verification Experiments Initial Verification Experiments Setup
Synchronization Delay Message Complexity Number of messages between each CS entry Total number of messages per CS entry Variables Network size Contention level Range from 5 to 30 for SuzukiKasami (why?) Range from 5 to 60 for Raymond (why?) low (sequential request/release) and high (all request/all release) SuzukiKasami Results (Low Load) SuzukiKasami Results (Low Load) SuzukiKasami Results (High Load) SuzukiKasami Results (High Load) Raymond Results (Low Load) Raymond Results (Low Load) Raymond Results (High Load) Raymond Results (High Load) Results Summary Results Summary Raymond Low Load High Load Message Complexity : log(n)/log(2) [not log(n)/2] Synchronization Delay : 2*log(n)/log(2) [not log(n)] Message Complexity : 4 Synchronization Delay : 2 SuzukiKasami Low Load High Load Message Complexity : N Synchronization Delay : 1 Message Complexity : N Synchronization Delay: 1 Raymond’s Children Raymond’s Children 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 How does the number of children affect the synchronization delay for Raymond’s DMX? Raymond’s Children Experiment Raymond’s Children Experiment Setup Attributes Synchronization Delay Number of children per node Variables Range from 1 to 8 (why?) Parameters 50 nodes in the network (why?) 40 sequential request/releases (low contention) Results Results Increasing the number of children per node decreases the message complexity SuzukiKasami Average Token Forwarding SuzukiKasami Average Token Forwarding 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 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 Forwarding Experiments Setup Attributes Message Complexity + Token Forwards until CS Network size Variables Range from 5 to 30 by 5 Parameters Nodes – 1 requests Based on the number of nodes in the network, the result is proportional to [(nodes*requests)+sum(1:requests)]/nodes SuzukiKasami Results SuzukiKasami Results Conclusions Conclusions Raymond Suzuki Kasami Better performance with many children Log(n)/log(c) message complexity and sync delay Very low sync delay Steady increase in total token forwards for high contention system Neither algorithm guarantees granting CS in timestamp order Future Work Future Work Test systems in continuous highcontention Test Raymond’s algorithm with random tree Current experiments are allrequest/allrelease, continuous high contention may produce alternate results It may not be possible to create a tree with specific children count, what results will be produced in the random case Perhaps there are tree algorithms which require highcontention critical section access within a small subgraph Could reduce costs of duplicate messages for highcontention system, but should not affect low contention Test algorithms in a real (nonrandom) situation Implement message piggybacking as suggested by Raymond Coding the Project Coding the Project Problems Message Size Request Queue Limited the number of nodes for SuzukiKasami Incrementing length Added methods to check contents of queue copyTokenToOut didn’t copy all information Required sending messages to all nodes to release Token was lost in some tests making that test erroneous No token loss check algorithm in place for these tests Knowing which node had the token Token loss Coding the Project Coding the Project Successes Algorithms Implementation was mostly successful Learning Python rather quickly Scripts can run arbitrary number of trials Outputting results to file for access later Scripts can be ran unattended (except changing network size) Utilized to create graphics Tython scripts MATLAB References References Brewer, E., Culler, D., Gay, D., and Levis, P., nesC 1.1 Language Reference Manual, www.tinyos.net/tinyos1.x/doc/nesc/ref.pdf, May 2003. Gay, D., Levis, P., von Behren, R., Welsh, M., Brewer, E., and Culler, D. 2003. The nesC language: A holistic approach to networked embedded systems. SIGPLAN Not. 38, 5 (May. 2003), 111. Hill, J., Szewczyk, R., Woo, A., Hollar, S., Culler, D., and Pister, K. 2000. System architecture directions for networked sensors. SIGOPS Oper. Syst. Rev. 34, 5 (Dec. 2000), 93104. Levis, P., Lee, N., Welsh, M., and Culler, D. 2003. 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 05 07, 2003). SenSys '03. ACM Press, New York, NY, 126137. Raymond, K. 1989. A treebased algorithm for distributed mutual exclusion. ACM Trans. Comput. Syst. 7, 1 (Jan. 1989), 6177. Suzuki, I. and Kasami, T. 1985. A distributed mutual exclusion algorithm. ACM Trans. Comput. Syst. 3, 4 (Nov. 1985), 344349. ...
View Full Document
- Spring '11
- Algorithms, Raymond, message complexity, token Token, Token DMX Raymond, SuzukiKasami Token DMX