CleverTap Interview Question

What are the different ways to prevent deadlock?