Interview questions part-9 and Deadlocks and performance tuning