How to avoid the Deadlock in the below program

Printable View