DBA > Job Interview Questions > DATABASE Administrator (DBA) Interview Questions and Answers

What is a deadlock and Explain?

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

115. What is a deadlock and Explain?

Waiting for an event that never happens or processed.
Ex : Say there are three process P1, P2, P3 and three resources R1, R2, R3.
(1) P1 is started and it is using R1.
(2) P2 is started and it is using R2.
(3) P3 is started and it is using R3.


To complete process P1 it needs resource R2 which is currently used by P2.
To complete process P2 it needs resource R3 which is currently used by P3.
To complete process P3 it needs resource R1 which is currently used by P1.

In this case each and every process is waiting for unoccured events. This situation we called as DEADLOCK.
To prevent this concept is there called DEADLOCK PREVENTION.

(Continued on next question...)

Other Job Interview Questions