On Mon, 12 Nov 2012 12:24:04 +0100 Alexander Boettcher (AB) wrote:
AB> On 12.11.2012 10:27, Norman Feske wrote: AB> > processes the execution flows through. As far as I know, NOVA is the AB> > only kernel of the Genode base platforms that properly implements AB> > priority inheritance. AB> Just some note for completeness: This is solely implemented for the IPC AB> mechanism of the kernel, however it is not supported for the semaphores AB> provided by the kernel. That means if semaphores are used as locks to AB> protect some critical section in user mode, the thread running inside AB> the critical section (and holding the lock) doesn't inherit the priority AB> of other threads also attempting to get into the same critical section.
We don't do it for semaphores, because semaphores can be used from different cores and cross-core inheritance doesn't work. We could add some limited form of local inheritance to semaphores, e.g. threads on the same core could help each other.
But - having only core-local inheritance for semaphores could lead to odd behavior, such as programs working as expected on a single-core machine and breaking when running on a multi-core machine, because a developer may have built assumptions about priority inheritance into their code.
So... how useful would core-local inheritance for semaphores be?
Cheers, Udo