Morgan Stanley interview question

How to identify deadlock?