Our database is running into problems, as many transactions are waiting for locks held by other transactions. Here is what each transaction is waiting for:

· T1 is waiting on T4

· T5 is waiting on T8

· T2 is waiting on T7

· T6 is waiting on T2

· T3 is waiting on T2

· T7 is waiting on T6

· T4 is waiting on T1

· T8 is not waiting

Which transactions are deadlocked?

Recommended Answers

All 3 Replies

There are more than one lock here. This looks like homework to me so I won't solve it for you but give you a hint. Rearrange the items you listed by grouping what goes together. Example, the first link of T1, T4 belongs with T4, T1. Remember I take it this is homework.

When that happens, I just kill the rogue transactions causing the deadlocks because odds are the person already closed their web browser because the page was taking too long to load. But I agree, this looks like you are just trying to trick us into doing your homework for you.

It depends on locks already held. Deadlock is p1 gets a and wants b bu about the same time p2 gets b and wants a. If all threads always lock resources in the same order, there is no deadlock or starvation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.