Question: Question 1: Diagnosing deadlocks There are four threads in the following program, labelled T to T4, which are (amongst other oper- ations) locking and unlocking

 Question 1: Diagnosing deadlocks There are four threads in the followingprogram, labelled T to T4, which are (amongst other oper- ations) locking

Question 1: Diagnosing deadlocks There are four threads in the following program, labelled T to T4, which are (amongst other oper- ations) locking and unlocking three mutexes labelled A, B, and C. The order of locking is shown below: T? : lock(A), lock(B), lock(C), unlock(A), unlock(B), unlock(C) T2 lock(A), lock(B), lock(C), unlock(C), unlock(B), unlock(A) Ts: lock(B), lock(C), unlock (B), unlock(C) T: lock(C), lock(A), unlock(A), unlock (C) 1. Which threads have the potential to de adlock here? Show two possible interleavings of instructions that cause at least two threads to go into a deadlock. 2. Draw your interleavings from the above as a resource dependency graph. Verify that the deadlock exists by highlighting the cycle

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!