Yahoo Interview Question

Improve performance of a multi threaded application, prevent the deadlock and use synclocks