Home > Back-end >  Linux under the deadlock problem
Linux under the deadlock problem

Time:12-05

Learning operating system deadlock when there is a question that how the deadlock, the formation of a deadlock condition is not very understanding, feeling a deadlock is solely should lock the Settings of the improper order,
For example I have two processes, operating variable I and j, how do you write code to implement a deadlock?
Is how to achieve a condition, in which a particular moment, 1 I process, process takes 2 j, the next process to use 1 j, process takes 2 I, into a deadlock,
Processes with I, 1, 2 can also get the I, how to implement in a Linux environment 1 2 and use it every time you can't use?

CodePudding user response:

With two locks used interchangeably deadlock, very easy
  • Related