Morgan Stanley Interview Question

What is a deadlock? How can you prevent deadlocks? Can a single thread/process be deadlocked with itself? How?