Consider there are $3$ threads T1, T2, and T3. And there are $4$ locks L1, L2, L3, and L4.
- T1 acquires and releases the locks L1 and L2.
- T2 acquires and releases the locks L1 and L3.
- T3 acquires and releases the locks L3, L1, and L4.
In which of the following cases deadlock is possible?
- T1 runs to completion, then T2 to completion, then T3 runs.
- T1 and T2 runs concurrently to completion and then T3 runs.
- T1 and T3 runs concurrently to completion and then T2 runs.
- None of the above.