Bloomberg Interview Question

What is 'deadlock'?

Interview Answers

Anonymous

May 31, 2010

When two competing threads/processes need to acquire a resource which the other one has they are said to be deadlocked. Both want what the other has to perform a task but neither will release what they have until they get what the other has. A timeout on the held resources would help deadlock avoidance in this instance.

3

Anonymous

Sep 6, 2011

Thread A has resource 'X' locked, and needs to access resource 'Y' before releaseing 'X' but 'Y' currently locked. Meanwhile its Thread B that has 'Y' locked, but needs to access 'X' before releasing 'Y'. Without a timeout its a dead lock.

Anonymous

Feb 27, 2010

Threading process