Deadlocks, Computer Operation System / Architecture Please explains why or why n
ID: 3820384 • Letter: D
Question
Deadlocks, Computer Operation System / Architecture
Please explains why or why not? Thanks
(Q1) Given resource type X with two instances, resource type Y with a single instance, and three threads. As illustrated in there source allocation graph, Thread 0 owns resource type Y's instance and is waiting for resource type X Thread 1 owns one instance of resource type X. Thread 2 owns the other instance of resource type X and is waiting for resource type Y. Is there any deadlock? Why or why not? Thread 0 Waiting for Owned by Resource X Resource Y Thread 1 Owned by Owned by Waiting for Thread 2Explanation / Answer
yeah there is deadlock in the system
there are 2 instances of X and 1 instance of Y
Y instance is currenlt accquired by thread0, one x instance is acquired by thread 1 and other x intsance is acquired by thread 2.
now Thread0 wants to own a instance of X but there is no available insatnce so x is locked
and Thread2 want the instance of Y which is right now acquired by thread0 so thread 2 is deadlocked
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.