Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementation of Ricart Agrawala Algorithm

Similar presentations


Presentation on theme: "Implementation of Ricart Agrawala Algorithm"— Presentation transcript:

1 Implementation of Ricart Agrawala Algorithm
By: Rahul Khadse Computer Science Department Kent State University

2 INTRODUCTION My Project implements Ricart Agrawala Algorithm .
Objective :- Implement the Algorithm using C++. Modify the Algorithm Study the performance of the Algorithm. To understand the behaviour of the algorithm in different cases.

3 Short Review of Algorithm
Ricart Agrawala is optimization of Lamport's Algorithm that dispenses with Release messages by cleverly merging  them with Reply messages Reduced message complexity :  2(N-1) Lamport Algorithm Ricart Agrawala Request (N-1) Reply(N-1) Release(N-1) Request(N-1)

4 Ricart Agrawala Experimentation Setup :
Original Algorithm : Vary the no of nodes in system (size). Vary the No of nodes accessing CS (Load) Modification of Ricart Agrawala Algorithm The Algorithm tends to favor lower numbered nodes slightly , owing to tie breaking rule This Favoritism can be reduced by incrementing the SQN by higher no for lower numbered nodes

5 Ricart Agrawala Experimentation Setup :continued
Process Increment P0 20 P5 1 P1 P6 P2 P7 P3 P8 P4 P9 My expected result was : After modification no of CS accesses made by low numbered processes should increase than high numbered processes.

6 Results (Orginal Algorithm)

7 Results (Orginal Algorithm) contd..
Message Complexity doesnot change in case of High Load and Low Load . Message Complexity changes with no of processes in the system.

8 Results (Modified Algorithm)
When total no of CS accesses are 200 .

9 Results (Modified Algorithm) continued..

10 Results (Modified Algorithm) continued..

11 Future Research Making Ricart Agrawala to work in practical networks  :- Insertion of new nodes Removal of Nodes Failure of Nodes Hierarchical Ricart Agrawala can be implemented in case there are multiple sites and several no of processes working in each site.

12 Conclusion Message complexity of Ricart Agrawala is not depend on high load or low load but depends on the number of processes in the system. Thus Ricart Agrawala gives constant performance even in case of high load. In modified Ricart Agrawala irrespective of sequence number increment by higher number for low numbered (Higher Priority Process) , the number of CS accesses made by high priority and low priority processes are same.

13 Code Design and Difficulties
Simulator :- Creating the instance of Processes. Running the implementation of Ricart Agrawala algorithm Function MUTEX which invokes mutual exclusion for particular node Function RECEIVE for Receiving Request or Reply. Difficulty :- For designing function MUTEX I need to access the data of all Processes . But C++ don't allow to pass a complete block of message by value as a parameter to a function Hence I used vector and passed it as a parameter by reference instead of by value .

14 Thank You Questions ?


Download ppt "Implementation of Ricart Agrawala Algorithm"

Similar presentations


Ads by Google