I dont think you can use the same tools to prevent dead lock of ur thread with a process in OS.
The tools you use are the same, even though they have a different nomenclature. We use mutexes (the equivalent of an object lock) and semaphores (which are basically just fancy mutexes) to synchronize the use of resources, and shared memories or message queues to transfer information between processes. It is probably not what the original poster wanted to know, and maybe I was going a bit too deep with my answer, but it is technically possible to create a deadlock if your application only has one thread, by starting multiple processes. Vadz, you probably don't need to worry about deadlocks in a single threaded application, unless your app communicates with other processes.
Yaroslav, wait() and notify() will not automatically prevent deadlocks in your application. From core Java 2 Volume 2:
Consider the following situation:
Account 1 : $2000
Account 2 : $3000
Thread 1 : Transfer $3000 from Account 1 to Account 2
Thread 2 : Transfer $4000 from Account 2 to Account 1