Explain the fundamental differences between a process and a thread, and outline the conditions that lead to a deadlock in a distributed environment.