Skip to main content
edited tags
Link
Post Migrated Here from unix.stackexchange.com (revisions)
Source Link
Udaya
Udaya

Two threads are waiting on a mutex. Which one is unblocked?

Suppose there are three threads A, B, C and thread A has acquired a mutex lock and it is processing. If threads B and C try to acquire the same mutex, they will be blocked according to the mutex lock concept. But once thread A completes, which of the threads will be unblocked? Is there any scheduling policy?