Snapshot Algorithms - Kent State University

Download Report

Transcript Snapshot Algorithms - Kent State University

Snapshot Algorithms
Chandy-Mishra
Ho-Ramammorthy 2 phase
Index
Introduction
 Experimental Setup
 Results Analysis
 Conclusion
 Future Work
 References

Introduction

Snapshot Algorithm:



Chandy Mishra:



One phase snapshots
Two phase snapshots
Any random process can take snapshot at random time
Snapshot consists of state information about the system and
message queue
Ho-Ramammorthy:


Status Table maintained by each process
Coordinator process creates WFG’s from status table
Experimental Setup

Snapshot algorithms run on top of a basic algorithm.

In this implementation Basic algorithm used is simple flooding.

Each process forwards a message at least once.

Each process receives at least one message.

When above two conditions are satisfied algorithm terminates.

Data points are inserted to count total number of messages forwarded
and total Time taken.
Results Analysis: Chandy Mishra Output
Process process2: taking snapshot
Process process4 has :
Process process3 has : Message3
Process process2 has :
Process process1 has :
Process process0 has :
SimulationEngine MessageQueue has :Message0,Message1,Message2
MessageDispatcher : Message0 from process1 to Processes process3
Process process3: taking snapshot
Process process4 has :
Process process3 has : Message0
Process process2 has :
Process process1 has :
Process process0 has :
SimulationEngine MessageQueue has :Message1,Message2,Message3
MessageDispatcher : Message1 from process1 to Processes process2
MessageDispatcher : Message2 from process2 to Processes process1
Process process0: taking snapshot
Process process4 has :
Process process3 has :
Process process2 has :
Process process1 has : Message2
Process process0 has :
SimulationEngine MessageQueue has :Message3,Message0,Message1
Results Analysis: Ho-Ramammorthy Output
process3 : selectedProcess :process4
process3 : selectedProcess :process4
process4 : selectedProcess :process1
process0 : selectedProcess :process3
process1 : selectedProcess :process4
process4 : selectedProcess :process3
process0 : selectedProcess :process1
process4 is locked by Message1 and waiting for process3
process3 is locked by Message0 and waiting for process4
process2 is not locked by any message
process1 is locked by Message2 and waiting for process4
process0 is locked by Message3 and waiting for process1
In createWFGAndDetectDealLock
Deadlock Detected
process4 is locked by Message1 and waiting for process3
process3 is locked by Message0 and waiting for process4
process2 is not locked by any message
process1 is locked by Message2 and waiting for process4
process0 is locked by Message3 and waiting for process1
In createWFGAndDetectDealLock
Deadlock Detected
Deadlock detected: process4-->process3-->process4
Results analysis: Ho-Ramammorthy
Ho-Ramammorthy 2 Pahse Snapshot
100
90
80
Total Time
70
60
50
40
30
Time
20
10
0
0
5
10
15
Number of Processes
20
25
30
Result Analysis : Ho-Ramammorthy
Ho Ramammorthy 2 Phase Snapshot
60
Number Of Messages
50
40
30
Messages
20
10
0
0
5
10
15
Number of Processes
20
25
30
Result Analysis: Chandy Mishra
Chandy Mishra Snapshot
400
350
Number of Messages
300
250
200
Series1
150
100
50
0
0
5
10
15
Number Of Processes
20
25
30
Result Analysis: Chandy Mishra
Chandy Mishra Snapshot
1400
1200
Total Time
1000
800
Series1
600
400
200
0
0
5
10
15
Number of Processes
20
25
30
Message Complexity Comparison:
CM Vs HR2 Message Complexity
Messages
400
350
300
Ho Ramammorthy
250
Chandy Mishra
200
150
100
50
0
1
2
3
Number of Nodes
4
5
Time Complexity Comparison:
CM Vs HR2 Time Complexity
Time
1400
1200
1000
800
Chandy Mishra
600
Ho Ramammorthy
400
200
0
1
2
3
Number Of Processes
4
5
Conclusion

As seen in the graphs performance of Ho-Ramammorthy 2 phase
snapshot algorithm is better than Chandy Mishra snapshot algorithm.



Message Complexity of Ho-Ramammorthy 2 phase snapshot is better than
Chandy Mishra snapshot algorithm.
Time complexity of Ho-Ramammorthy 2 phase deadlock detection is better
than Chandy Mishra snapshot algorithm.
Possibility of false deadlock detection in Ho-Ramammorthy 2 phase
snapshot algorithm remains in the implementation.
Future Work

Implementing the algorithms in more scalable manner.

Algorithm implementations needs to be tested on large real
distributed systems.

Ho-Ramammorthy 2 phase snapshot algorithm implementation
can be improved to reduce/remove the false deadlock detection
possibility.
References:

Distributed Deadlock Detection-K Mani Chandy and Jaydev Mishra

CHANDY, K.M., AND MISRA, J. A distributed algorithm for detecting resource deadlocks in
distributed systems. In Proc. A CM SIGA CT-SIGOPS Syrup. Principles of Distributed
Computing (Ottawa, Canada, August 18-20, 1982), ACM, New York, 1982, pp. 157-164.

LAMPORT, L. Time, clocks, and the ordering of events in a distributed system. Commun. ACM
21, 7 (July 1978), 558-565.