Qualcomm Interview Question

Explain a deadlock and design a simple solution for the same.