Pregunta de entrevista de Microsoft

How do you guarantee that there is no deadlock?