Reputation: 59
While reading[1] through I found the following
"This is done by replacing most kernel spinlocks with mutexes that support priority inheritance, as well as moving all interrupt and software interrupts to kernel threads."
My question is why not semaphores?
https://rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch
Upvotes: 1
Views: 912
Reputation: 59
Also Found the following
Just found this\n http://www.dilip.nijagal.com/geeky-stuff/45-technical-stuff/64-difference-between-semaphores-and-mutex
Upvotes: 0
Reputation: 15218
Mutexes are binary semaphores, so they are using a semaphore.
Specifically, the purpose of the lock is to ensure mutual exclusion. This means, create a critical section of code that gets executed only by one context at a time. So we want a semaphore that admits only a single contender - this kind of semaphore is a binary semaphore which has a special nick name to denote this kind of use: mutex.
Upvotes: 2