NVIDIA Interview Question

How to avoid deadlocks? Difference between thread and process?