Question: Consider four binary semaphores, ( mathrm { U } , mathrm { V } , mathrm { W } )
Consider four binary semaphores, mathrmUmathrmVmathrmW and X They all were initially set to Consider also four threads, mathrmTmathrm~Tmathrm~T and mathrmT executing the following sequences of code moving downward Currently, they have reached the inside of the functions which the arrows point to
points We use Resource Allocation Graph RAG to model this problem: each semaphore represents a singleunit resource, and the semwait and sem post operations represent resource requests and resource releases, respectively. Recall that the RAG changes as the time goes by All four threads currently have reached the inside of the functions which the arrows point to Draw the uptodate RAG at the current situation.
points Based on the RAG from above, some threads are stuck in deadlock. List all such threads.
points Propose a deadlock avoidance solution on how to avoid the above deadlock. Hint: follow the example of printer and plotter in class to find the positions like T to decide whether it should delay the request.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
