[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: Thread starvation with mutex



> From: Jamie Lokier [mailto:jamie shareable org]
>
> Thread A cannot unlock as long as the userspace word indicates "there
> are waiters".  Therefore it will keep looping calling FUTEX_WAKE It's
> a near-livelock not a deadlock, and will resolve eventually but may
> take a long time.

Ah, ah, ah, ok, I see what you mean. We loop until everything
falls in place together. That's the part that I missed. I was
picturing an O(1) operation for unlocking [kind of a requirement
in which I've been moving too often lately]...

Now, this near-livelock would easily become a livelock if A had 
higher priority than B (either FIFO/RR or the niceness delta greater 
than 10--in the specific case of Linux). This case worries me.

Ok, so to the extent that I am able to think today (not much), 
we have this fully covered in RTNPTL/fulock in serialized mode 
and in the  non-serialized case we'll have to take it into account.

Thanks for your patience

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own (and my fault) 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]