title: How to detect and find out a program is in deadlock?
body: <p>This is an interview question. </p>
  
  <p>How to detect and find out if a program is in deadlock? Are there some tools that can be used to do that on Linux/Unix systems? </p>
  
  <p>My idea: </p>
  
  <p>If a program makes no progress and its status is running, it is deadlock. But, other reasons can also cause this problem. Open source tools are valgrind (halgrind) can do that. Right? </p>