0 Replies - 11165 Views - Last Post: 25 December 2012 - 07:26 AM Rate Topic: -----

#1 erkant  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 108
  • Joined: 26-October 10

Questions regarding transaction executions

Posted 25 December 2012 - 07:26 AM

I have started learning about databases and SQL, and recently studied about transactions, including deadlocks, shared (S) locks, exclusive (X) locks, wait-die protocol and wound-wait protocol. The point is that I somehow understand the theory behind those things, but when I have a transaction example as below, I'm having difficulties in understanding where it causes a deadlock and how it can be solved using wait-die and wound-wait protocols.

If someone can give me the detailed answers of the following questions regarding the transaction execution given below I would be glad.


1) When and why deadlock happens?
2) How it can be handled using wait-die protocol?
3) How it can be handled using wound-wait protocol?

    T3             T4
lock-X(B)   |
read(B)     |
B := B - 50 |
write(B)    |
            | lock-S(A)
            | read(A)
            | lock-S(B)
lock-X(A)   |

P.S I cannot delete those "/>", if someone can edit and delete them, I would be glad.

MOD EDIT: Removed; turn off emoticon support when this happens.

This post has been edited by JackOfAllTrades: 26 December 2012 - 06:41 AM

Is This A Good Question/Topic? 0
  • +

Page 1 of 1