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