persistence
persistence

Reputation: 41

Deadlocks in concurrent transactions

I am trying to find an algorithm that detects deadlocks in concurrent transactions in a software. I have tried googling but have not found anything. Can someone point be to a good resource to follow on the subject or can someone explain this algorithm?

Upvotes: 0

Views: 582

Answers (1)

djna
djna

Reputation: 55957

Detecting deadlock implies some knowledge of the resources that are being acquired. In the simpler cases a single resource manager (such as a database) owns the resources (such as locks on records) and so can detect a cycle in lock requests. Hence the algorithms such as those discussed here can be applied.

In the case of two concurrent transactions, taking locks on arbitrary resources I don't see how we can do this without a "supervisor" view of all the locks that are being taken. If we have that supervisory view then we can apply the algorithms referenced earlier.

Primarily we are looking for cycles in the resourece reaquirements. This is an outline of an approach.

Upvotes: 1

Related Questions