Apps Associates Interview Question

how to handle deadlocks in dbms ? Explain about multiple granularity?