if(Finish[i]==false)return “deadlock”;
Security sequence refers to the process of the current application of resources out of a sequence, to ensure that the allocation of resources according to this sequence to complete the process, there will be no "soy sauce and vinegar" embarrassing problems.
We assume that there are processes P1, P2,..... PN
Then the security sequence requirements meet: PI (1 < = I < = n) required resources < = remaining resources + allocated to PJ (1 < = J < I) resources
Why are there resources that have been allocated to the right of the equal sign? Think about the problem of bankers. The resources allocated are like the second developer. If people can pay back the money, we have to take this into account.