Transcript Slide
Raymond Exclusive Algorithm
Lakshmi Nannapaneni
Contents
Introduction
Experimental setup
Result Analysis
Conclusion
Future Work
Introduction
•
Non-broadcast algorithm.
•
Sends request along the directed edge to its holder.
•
Each site maintains a request queue for storing
requests.
•
Token is released when the token is idle with the
process and send with a PRIVILEDGE message along
the edge.
•
If the sites id is top of its request Q then the site can
enter critical section.
Experimental Setup
Average of total number of messages sent for
each critical section execution.
Results taken by varying critical section
execution of load, half load, full load for the
nodes from 10 to 100
Topologies : Chain, Tree, Star
Messages
Result Analysis: Star topology
Nodes
Messages
Result Analysis: Tree topology
Nodes
Messages
Result Analysis: Chain topology
Nodes
Conclusion
The worst case occurs at low loads and in chain
topology which increases the diameter of the network
used.
However this is improved under full load condition.
Future Work
Future work includes testing the performance of the
algorithm on chain of large number of nodes in
thousands range to get the accurate result.
The implementation can be enhanced to make Raymond
Tree work for completely connected graphs in which a
spanning tree can be formed and algorithm can be
applied on that.
Code Defense
// sending token to the process that requests to enter into critical section
public synchronized void sendTokenToProcess(int pid, Token t) {
if(hasToken)
{
this.hasToken=false;
this.holder=pid;
Parent.p[pid].setHolder(pid);
Parent.p[pid].setHasToken(true);
Parent.p[pid].hasSentRequest=false;
System.out.println("Token sent from P"+id+" to site P"+pid);
System.out.println("*******-------NOW THE TOKEN
HOLDER IS p"+pid+ "------*******");
this.hasToken=false;
}