Domanda di colloquio di Elastic

When does a deadlock occur?

Risposte di colloquio

Anonimo

21 lug 2017

When the locks are accessed in wrong order. Basically one thread picks lock A first and lock B after, while at the same time another thread picks lock B first and lock A after. This can be solved by comparing the participating objects system hashcodes and re-ordering the locks accordingly.

Anonimo

21 gen 2019

When a thread that has acquired an lock on a particular resources for its task execution and at the same time when an another thread wants to access the same resources for its task execution then at that situation deadlock occurs.

Anonimo

16 ott 2019

This looks so good: bit.ly/faang100