We have 3 reusable resources. A,B,C. We have 3 process X,Y,Z, and each one of them uses periodically 2 of these 3 resources.
Proc. X takes A, then B and then uses both A,B and then releases them.
Proc. Y takes B, then C and then uses both B,C and then releases them.
Proc. Z takes C, then A and then uses both C,A and then releases them.
If 2 of the processes run "parallel" can we have deadlock? If yes, describe the scenario.
If 3 of the processes run "parallel", describe a scenario with a deadlock.
The first question asks if we can get into a deadlock situation with two processes running. There are only three combinations that have two processes running:
In the XY case X takes A and then B. Y takes B then C. If X has already taken B by the time that Y wants it then Y will have to wait. ...
This solution examines the deadlock possibilities in the situation where there are three processes sharing three resources.