Pergunta de entrevista da empresa Bloomberg

What is 'deadlock'?

Respostas da entrevista

Sigiloso

31 de mai. de 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

Sigiloso

6 de set. de 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.

Sigiloso

27 de fev. de 2010

Threading process