sri
Answered On : Jan 21st, 2006
dead lock occurs due to synchronization mechanism so to prevent dead lock we need to violate one of the following conditions:
1.mutual exclusion
2.no preemption
3.circular wait
4.hold and wait
Login to rate this answer.
svsathya
Answered On : Mar 31st, 2007
Because threads can become blocked and because objects can have synchronized methods that prevent threads from accessing that object until the synchronization lock is released, it's possible for one thread to get stuck waiting for another thread, which in turn waits for another thread, etc., until the chain leads back to a thread waiting on the first one. You get a continuous loop of threads waiting on each other, and no one can move. This is called deadlock
Login to rate this answer.