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

Re: Thread starvation with mutex



Jamie Lokier wrote:
> Waiters are FIFO queued.

Waiters _are_ FIFO queued, but that is not enough to solve this
starvation problem.  You also need wakeups to immediately pass
ownership of the mutex to the woken thread.

There is a "fair" mutex variant in Rusty's original futex prototype
library which has this property.  I'm fairly sure Glibc does not use
that method, though.

-- Jamie




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