Re: Thread starvation with mutex
Jamie Lokier <[email protected]> Fri, 6 Feb 2004 22:25:10 +0000
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <[email protected]> |
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