Answer:
When two computer programs sharing the same resource prevent each other from accessing the resource results in a deadlock. This deadlock results in finishing the program.
Example:
P1 requests R1 and receives it.
P2 requests R2 and receives it.
P1 requests resource R2 and is queued up, pending the release of R2.
P2 requests resource R1 and is queued up, pending the release of R1
Here, P and R is Program and Resource respectively.
Example:
P1 requests R1 and receives it.
P2 requests R2 and receives it.
P1 requests resource R2 and is queued up, pending the release of R2.
P2 requests resource R1 and is queued up, pending the release of R1
Here, P and R is Program and Resource respectively.
Previous Question | Next Question |
Do you know what guidelines should be followed to help minimize deadlocks? | What is a live lock? |