Previous | Next --- Slide 11 of 35
Back to Lecture Thumbnails
cloudhary

So the implementation of pthread mutex lock is based on cooperative scheduling (because the syscall notifies the OS to deschedule it). How does the OS know when the lock has been freed to then reschedule this thread to run?

nba16235

@cloudhary, I have the same question. My understanding is that hitting a block will trigger a context switch but other than that the OS can switch among multiple threads arbitrarily.