Three processes A B C. When conducting the safety algorithm, no explanation that I've been able to find answers the question of how the processes are being compared. Is it the total processes added up, or every process individually must pass the '<=' operator, or is it like regular integers where Process A would be the most significant comparison?


TLDR Answer: It's individual based. Each process work/available item in the matrix, must satisfy each need.


In Banker's Algorithm,

Every processes are compared individually.

So, In your question

If the Need is 1 0 1 and available matrix is 0 0 2, then this need can't be satisfied. Because there is no resource available for Process A.

| cite | improve this answer | |
  • $\begingroup$ Okay so if that's the case... if the Need is 0 0 1 and the available matrix is 9 9 0. It does not pass? $\endgroup$ – john stamos Apr 19 '18 at 4:30
  • $\begingroup$ Right. Because of no resource for Process C. $\endgroup$ – Sanjay Chandlekar Apr 19 '18 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.