Pergunta de entrevista da empresa eBay

Please explain synchronization in multi-thread environment and show us potential problem with deadlocks.