Do you know what is a deadlock and what is a live lock? How will you go about resolving deadlocks?

Submitted by: Administrator
A deadlock occurs when two or more processes waits for a resource that is acquired by or is under the control of another process. A live lock is similar to a deadlock except the process states keeps changing. The result of such state is that none of the process will be complete.
Deadlock detection finds and resolves deadlocks. A WFG strategy is followed. WFG is wait for graph. In WFG, processes are represented by nodes while dependencies are represented by edges. Thus, if process A is waiting for a resource held by process B, there is an edge in the WFG from the node for process A to the node for process B. a cycle is this graph is a deadlock. WFG constantly checks for cycles or when a process is blocked and adds a new edge to the WFG. When a cycle is found, a victim is selected and aborted.
Submitted by:

Read Online SQL Server Database Administrator Job Interview Questions And Answers