For understanding the Deadlock
Lets consider the following example,
If suppose there are 3 processes like P1,P2,P3
Process P1 hold some resources and waiting for some other resources to free, which r hold by process P3.
same with Process P2 which is holding some resources and required other resources which r hold by process P1
Now process P3 required some resources which r hold by Process P2.
Now try to understand the situation,
Process P1 waiting for some resources which are hold by Process P3.
i.e P1 -> P3
Process P2 waiting for some resources which are hold by Process P1.
i.e P2 -> P1
Process P3 waiting for some resources which are hold by Process P2.
i.e P3 -> P2
In all every process is waiting for some other process to free some resources.
This situation is called deadlock.
I hope you got it........