title: How is a thread waiting for mutex put back to running?
body: <p>The context is like this:</p>
  
  <ul>
  <li>a thread tries to lock a already locked mutex</li>
  <li>the thread is put to sleep/blocking </li>
  <li>after some while, the mutex is unlocked</li>
  </ul>
  
  <p>Q1) What will happen then ?</p>
  
  <p>will the thread be immediately put back to running?  Or kernel will still wait the running thread consume its time slice and schedule the waiting thread normally?</p>
  
  <p>Q2) What if the mutex is not unlocked forever? How does the kernel determine to keep the thread waiting?</p>