JPMorganChase Interview Question

How do you solve deadlock ?