NSEIT interview question

How will you avoid deadlock?