title: how does the linux kernel avoid deadlocks?
body: <p>How does the linux kernel avoids deadlocks in user processes? Does it have a built-in mechanism that prevents them, or one that recognizes and kills them?</p>
  
  <p>And, is there anything similar for kernel programming?</p>