Professional Documents
Culture Documents
32
International Journal of Computer Applications (0975 – 8887)
Volume 73– No.1, July 2013
33
International Journal of Computer Applications (0975 – 8887)
Volume 73– No.1, July 2013
Table5: Linear Transaction Structures at site 1 and 2. Table9: Transaction Queue for Global Deadlock Cycle.
LTS1: LTS2:
P q Tno TPid
p q
1 2 1 1
5 7
1 3 3 2
7 6
3 2 4 3
6 5
3 4
4 1 Create Transaction Queue TQi corresponding to each
GDi.
NO CYCLE EXISTS.
Create Distributed Transaction Structure (DTSi) for Abort the victim transaction T4.
global communication. So, total number of transactions aborted: 2 (T4, T2)
34
International Journal of Computer Applications (0975 – 8887)
Volume 73– No.1, July 2013
LD22: {5,2→6,2; 6,2→3,2; 3,2→5,2} Abort the victim transaction T3,1 and T8,3.
LD31: {7,3→8,3; 8,3→9,3; 9,3→7,3} Total Number of Transactions Aborted: 8
LD32: {7,3→10,3; 10,3→9,3; 9,3→7,3}
LD33: {10,3→9,3; 9,3→11,3; 11,3→10,3} 5.2.2. Deadlock detection by proposed algorithm:
Create Transaction Queue TQi corresponding to each Create Linear transaction Structure (LTSi) for
LDi. Each site:
Table11: Transaction Queues for local deadlock Table14: Linear Transaction Structures at site 1,2 and 3.
cycles. LTS1: LTS2: LTS3:
TQ1: TQ21: p q p q
p q
3,2 4,2 7,3 8,3
Tno TPid Tno TPid 1,1 2,1
4,2 6,2 8,3 9,3
3,1 1 3,2 1 3,1 1,1
4,2 2 6,2 3,2 9,3 7.3
1,1 2 1,1 4,1
6,2 3 3,2 5,2 7,3 10,3
4,1 3 4,1 3,1
5,2 6,2 10,3 9,3
9,3 11,3
TQ22: TQ31: 11,3 10,3
Tno TPid Tno TPid Create distributed transaction structure for each site.
5,2 1 7,3 1
6,2 2 8,3 2 Table15: Distributed transaction Structures (DTSi)
3,2 3 DTS1: DTS2:
9,3 3
p q p q
3,1 3,2 4,2 6,2
3,2 4,2 6,2 7,3
TQ32: TQ33:
4,2 4,1 7,3 8,3
Tno TPid Tno TPid 4,1 3,1 8,3 4,2
10,3 1 10,3 1
9,3 2 9,3 2 Detect Local Deadlock cycle LDi.
7,3 3 11,3 3 LD1: {3,1→1,1; 1,1→4,1; 4,1→3,1}
LD21: {3,2→4,2; 4,2→6,2; 6,2→3,2}
LD22: {5,2→6,2; 6,2→3,2; 3,2→5,2}
Abort the victim transactions T4,1; T6,2; T3,2; T9,3;
LD31: {7,3→8,3; 8,3→9,3; 9,3→7,3}
T7,3 and T11,3.
LD32: {7,3→10,3; 10,3→9,3; 9,3→7,3}
Create Distributed Transaction Structure (DTSi) for LD33: {10,3→9,3; 9,3→11,3; 11,3→10,3}
global communication.
Detect Global Deadlock cycle GDi.
GD1:{3,1→3,2; 3,2→4,2; 4,2→4,1; 4,1→3,1}
Table12: Distributed Transaction Structures (DTSi) GD2:{4,2→6,2; 6,2→7,3; 7,3→8,3; 8,3→4,2}
DTS1: DTS2: Find the CREi:
CRE1: {4,1→3,1}
p Q p q
CRE2: {4,2→6,2}
3,1 3,2 4,2 6,2 Abort the edges: {4,1→3,1} and {4,2→6,2}
3,2 4,2 6,2 7,3 Modify LTS:
4,2 4,1 7,3 8,3
Table16: Modified Linear Transaction Structures at
4,1 3,1 8,3 4,2
site 1, 2 and 3.
LTS1: LTS2: LTS3:
Detect Global Deadlock cycle GDi.
GD1:{3,1→3,2; 3,2→4,2; 4,2→4,1; 4,1→3,1} p q p q p q
GD2:{4,2→6,2; 6,2→7,3; 7,3→8,3; 8,3→4,2} 1,1 2,1 3,2 4,2 7,3 8,3
Create Transaction Queue TQi corresponding to each 6,2 3,2 8,3 9,3
3,1 1,1
GDi. 9,3 7,3
1,1 4,1 3,2 5,2
7,3 10,3
Table13: Transaction queues for global deadlock 5,2 6,2
cycles. 10,3 9,3
Tno TPid 9,3 11,3
Tno TPid
4,2 1 11,3 10,3
3,2 1
4,2 2 6,2 2
7,3 3 Detect Local Deadlock cycle LDi.
4,1 3 LD1: null
3,1 4 8,3 4 LD21: null
LD22: {5,2→6,2; 6,2→3,2; 3,2→5,2}
35
International Journal of Computer Applications (0975 – 8887)
Volume 73– No.1, July 2013
LD31: {7,3→8,3; 8,3→9,3; 9,3→7,3} 2) Alom B. M. M., Henskens F., Hannaford M., “Deadlock
LD32: {7,3→10,3; 10,3→9,3; 9,3→7,3} Detection Views of Distributed Database”, Proc. of sixth
LD33: {10,3→9,3; 9,3→11,3; 11,3→10,3} International Conference on Information Technology:
Create Transaction Queue TQi corresponding to each New Generations, pp. 730-737, 2009.
LDi.
3) Chandy X. M. and Misra J.,“A Distributed Algorithm for
Detecting Resource Deadlocks in Distributed Systems”,
Table17: Transaction Queues for local deadlock
Proc. of the First ACM SIGACT-SIGOPS Symposium
cycles.
on Principles of Distributed Computing, New York, pp.
157-164, 1982.
TQ1:null TQ21:null
4) Choudhary A. N., “Cost of Distributed Deadlock
TQ22: TQ31: Detection: A Performance study”, Proc. of Sixth
Tno TPid Tno TPid International Conference on Data Engineering, Los
7,3 1 Angeles, CA, pp.174-181, February, 1990.
5,2 1
6,2 2 8,3 2 5) Choudhury A. N., Kohler W. H., Stankovic J. A., and
9,3 3 Towsley D.,"A Modified Priority Based Probe Algorithm
3,2 3
for Distributed Deadlock Detection and Resolution,"
IEEE Transactions on Software Engineering, vol. 15:1,
TQ32: TQ33: pp. 10-17, 1989.
6) Farajzadeh N. , Hashemzadeh M. ,Mousakhani M. and
Tno TPid Tno TPid
Haghighat A. T., "An Efficient Generalized Deadlock
10,3 1 10,3 1 Detection and Resolution Algorithm in Distributed
9,3 2 9,3 2 Systems," in International Conference on Computer and
7,3 3 11,3 3 Information Technology, 2005.
7) Henskens F. and Ashton M. G. , "Graph-based
Optimistic Transaction Management", Journal Of Object
Abort the victim transactions T3,2; T9,3; T7,3 and T11,3. Technology, vol. 6: 6 pp. 131-148, 2007.
Modify Distributed Transaction Structure (DTSi) for 8) Ho G. S. and Ramamoorthy C. V., “Protocols for
global communication. Deadlock Detection in Distributed Database Systems”,
IEEE Transaction on Software Engineering, vol. 8, no. 6,
Table18: Distributed transaction Structures (DTSi) pp. 554-557, 1982.
DTS1: DTS2:
p q 9) Kawazu S., Susumu M., Menji I. and Kastumi T.,
p q
"Two-Phase Deadlock Detection Algorithm in
3,1 3,2 6,2 7,3 Distributed Databases", International Conference on
3,2 4,2 7,3 8,3 Very Large Databases (VLDB) 1979 360-367.
4,2 4,1 8,3 4,2 10) Menasce D. A. and Muntz R. R., “Locking and Deadlock
Detection in Distributed Databases”, IEEE Transaction
Detect Global Deadlock cycle GDi. on Software Engineering, vol. 5, no. 3, pp. 195-202,
GD1: null 1979.
GD2: null
Create Transaction Queue TQi corresponding to each 11) Mitchell D. P. and Merritt M. J., "A Distributed
GDi. Algorithm for Deadlock Detection and Resolution",
Null AT&T Bell Labs, Murray Hill, NJ 07974.
Total Number of Transactions Aborted: 6
12) Obermack R., “Distributed deadlock Detection
6. CONCLUSION: Algorithm”, ACM Transaction on Database Systems,
Deadlock detection is the most important problem that vol. 7, no. 2, pp. 144-56,1983.
must have a strong attention in case of distributed systems. 13) Olson A. G. and Evans B. L., "Deadlock Detection for
Several algorithms have been proposed for detection and Distributed Process Networks", in ICASSP, 2005, pp. 73-
resolution of deadlocks. In this paper, we have analyzed the 76.
various algorithms and proposed a new technique for
detection and recovery of deadlocks in distributed databases. 14) Sinha M. K. and Natarjan N., ”A Priority Based
Also we have analyzed the performance of proposed Distributed Deadlock Detection Algorithm”, IEEE
algorithm and compared with techniques presented in the Transaction on Software Engineering, vol. 11, no. 1,
literature. We observed that proposed technique resolve pp.67-80, 1985.
deadlock by terminating less number of transactions. 15) Srinivasan S. and Rajaram Ramaswamy, “An Efficient
Detection and Resolution of Generalized Deadlocks in
7. REFERENCES: Distributed Systems”, International Journal of Computer
1) Alkhatib G. and Labban R. S., "Transaction Management Applications, pp. 1-7, 2010.
in Distributed Database Systems: the Case of Oracle‟s
Two-Phase Commit," The Journal of Information
Systems Education, vol. 13:2, pp. 95-103, 1995
IJCATM : www.ijcaonline.org 36