NVIDIA interview question

How to avoid deadlocks? Difference between thread and process?