How is a thread waiting for mutex put back to running?
问题 The context is like this: a thread tries to lock a already locked mutex the thread is put to sleep/blocking after some while, the mutex is unlocked Q1) What will happen then ? 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? Q2) What if the mutex is not unlocked forever? How does the kernel determine to keep the thread waiting? 回答1: Will the thread be immediately put back to