Interview Question how to prevent n threads from n deadlock resources in java

This question was asked in an interview, and the approach adopted in the architectural plan to solve this problem at a high level was evaluated. In Java, how can this be solved -> N threads .. n resources .. what protocol do you use to ensure that there are no deadlocks?

So, can someone tell me the most optimal approach? making all methods synchronized can cause the system to slow down, so how to solve this problem?

+3
source share
3 answers

, . , , , . - .

+3

?

, "", , .

0

N N, - . , .

, , , . " ", , 2 , "" "" , . -, Venkat . Jame .

, .

, , .

0

Source: https://habr.com/ru/post/1780462/


All Articles