ASMPT interview question

What method can be used to fix the deadlock problem?