Important point to note:
For single resource system cycle in resource allocation graph is necessary and sufficient condition for deadlock.
For multi resource system, cycle in resource allocation graph is necessary (else there will be no circular wait) but not sufficient condition for deadlock. We need to apply Banker's algorithm to see if we can get a safe sequence.