What is meant by deadlock

Showing Answers 1 - 2 of 2 Answers

Muthu.J

  • Sep 15th, 2005
 

During multithreading process, it may happen for a same variable which is to be get incremented in a method and the same variable is needed for processing in another method. This critical condition may lead to deadlock.

We can prevent deadlock by providing the keyword synchronized to both of the methods.

  Was this answer useful?  Yes

yogeshpanda

  • Sep 22nd, 2005
 

Deadlock can be explained as ------ a1 is used by A b1 is used by B Now without leaving (lock-sychronised) At same time without leaving b1, a1, A wanted b1. B wanted a1.So both will ask for other resource which will not be available by anyway.This generates deadlock.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions