Here is the question I'm having trouble with:
Give the resource graph and determine whether a deadlock state results. Assume that when a thread requests an available or unallocated resource, the OS immediately allocates that resource to the thread.
- There are three threads: T1, T2, T3
- There are three resources: R1, R2, R3
Here is the sequence of events:
- T1 requests R1
- T1 requests R3
- T2 requests R2
- T2 requests R3
- T3 requests R1"
Now, I have written out the graph for the problem.
Have I drawn the graph appropriately? Based off of this graph, I assume there is no deadlock because there are no cycles. I am unsure if my solution is correct. Can anyone help clarify this? Thank you!