Ericsson Interview Question

what is a Deadlock and how do you prevent it ?