Betsys Interview Question

How did you solve deadlock?