How priority propagation works on read/write lock?
Daniel Eischen
deischen at freebsd.org
Wed Jan 18 08:11:14 PST 2006
On Wed, 18 Jan 2006, rookie wrote:
> 2006/1/18, Daniel Eischen <deischen at freebsd.org>:
> >You will eventually do priority propagation for all of them
> > (A, B, and C) until G's priority is <= the priority of RW1.
> > It doesn't matter if you do one at a time or all of them
> > at once. They all (A, B, C) have to release RW1 before
> > G can run
>
> You don't point out the problem.
> Here the problem is propagating priority to D, {E1, E2, E3} and F. If it
> doesn't happen the whole system will starve.
I assume we already know how to propagate priority for mutexes, so
once you know how to propagate for RWlocks, it all just works.
Yes, once you choose a thread to propagate, you have to keep
propagating through whatever it is blocked on or until you
reach a point where the propagated priority is <= the priority
of the next thread in the heirarchy. I never questioned that
part of it, just the need to do it for all threads owning the
RW lock at the same time.
--
DE
More information about the freebsd-hackers
mailing list