Pergunta de entrevista da empresa Hexaware Technologies

What is a deadlock and how can it be avoided?