user2105849
user2105849

Reputation: 27

priority inversion in mutex vs semaphore

Why (and how) mutex can deal with priority inversion and semaphores not?

I read in lots of places that the difference (one of them) between mutex and semaphore is priority inversion, can anyone explain please?

Upvotes: 2

Views: 1637

Answers (1)

flup
flup

Reputation: 27104

From Wikipedia:

Since the mutex knows its current owner, it is possible to promote the priority of the owner whenever a higher-priority task starts waiting on the mutex.

Upvotes: 4

Related Questions