Practice mode Operating Systems

Three processes share identical units of one resource type, and each may need up to 4 units. What is the minimum number of units that guarantees deadlock cannot occur?

Correct answer B. 10

Explanation

The worst case is every process holding one unit less than its maximum, 3 units each, so 9 are in use and none can finish. One extra unit lets one process complete and release all 4 of its units, after which the others can finish too. The general rule is n(k - 1) + 1 = 3 x 3 + 1 = 10 units.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.