Added Details about deadlock and how to avoid it