Atlassian Interview Question

How to prevent dead lock?