Deadlock and cycle in a resource allocation graph

Problem Detail: enter image description here Here is a resource allocation graph asked in my Operating Systems Theory midterm. The question is, “Is there a deadlock here? Explain your answer in detail” Ra and Rb are resource sets and every dot inside of them are resources. Circles are processes. An arrow from process to a resource set means that process is requesting a resource from that set. An arrow from resource set to process means that process owns a resource from that resource set. I want to have your opinions on this, because the lecturer’s answer is conflicting with mine. Lecturer says there is a deadlock here. But my answer was, since Py and Pz are not requesting a resource, they will simply continue their execution and terminate, releasing their resources. Then Px and Pw can obtain their requested resources and keep executing. It is obvious there is a cycle in this graph as Px-Pw but this doesn’t conclude us to a deadlock. Thus I can’t see a way to make “there is a deadlock here”conclusion. So is there a deadlock here?

Asked By : Mert Çelikok

Answered By : Bartosz Przybylski

I did some thinking and then searching and all RAG conditions of this example leads to conclusion that there is no deadlock (altho there is a cycle here). Beside after searching I found this where you can find this: Which clearly stands Graph With A Cycle But No Deadlock Are you sure that you have your graph correct here?
Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/20131

Leave a Reply