July 2008 Blog Posts

Blocking is not Deadlocking

After interviewing several candidates for a database position, I was surprised to find that many didn’t know the difference between a block and deadlock.  Many used the terms interchangeably because they thought both were synonymous.  Although missing this interview question didn’t necessarily disqualify those candidates, it certainly didn’t help their chances.  I decided I’d contrast blocking and deadlocking here to help those who might not grasp the difference. Blocking Blocking is a necessary side effect of using locks to control concurrent resource access.  A lock is either compatible or incompatible with other locks depending on the lock mode.  Before a lock is...