Il 20/09/2012 09:51, liu ping fan ha scritto:
> Sorry, donot catching your meaning.  Does not "coarse->fine"  mean
> LOCK(coarse)-->LOCK(fine);  .. UNLOCK(fine)-->UNLOCK(coarse) ?

Yes.

>> > Valid:
>> >   lock(coarse)
>> >   lock(fine)
>> >
> But it is conflict with " localLock(fine) --> bigLock(coarse)" which
> is taken when mmio dispatch.

No, MMIO dispatch has to discard the fine-grained lock before acquiring
the big lock.

If you allow

  lock(fine)
  lock(coarse)

then the (presumably higher-priority) thread that is requesting the
fine-grained lock must wait for the lower-priority thread that holds the
coarse-grained lock.  Then you get priority inversion.

Paolo

Reply via email to