OpenText Interview Question

steps need to take to avoid deadlock ?