OpenText interview question

steps need to take to avoid deadlock ?