A resource allocation graph shows the current allocation of resources to processes and the current requests by processes for new resources.
- Processes are represented by circles.
- Resources are represented by rectangles. Small circles designate multiple units within a resource.
- Resource allocations are represented by edges directed from a resource to a process.
- Resource requests are represented by edges directed from a process to a resource.
The assumption in deadlock analysis and management is that the underlying code is correct. With erroneous code, a process could block itself, for example by acquiring a resource and then requesting the same resource again without releasing the first allocation.
Remember when I tell you that if you open something, you got to close it, and you should close it as soon as you’re done using it. This is why.
A process is deadlocked in a state if the process is blocked in that state and if no matter what state transitions occur in the future, the process remains blocked.
A state is called a deadlock state if it contains two or more deadlocked processes.
A state is a safe state if no sequence of state transitions exists that would lead from the state to a deadlock state.
As systems become more and more complex, it is harder and harder to develop these graphs as more processes and more resources are constantly being used and developed.
A System Model for Deadlocks was originally found on Access 2 Learn