Teradata Interview Question

How to resolve and avoid deadlock in software program