Messages in this thread | | | Date | Sun, 3 Dec 2000 13:41:31 -0500 (EST) | From | <> | Subject | Re: mmap_sem (and generic) semaphore fairness question |
| |
On Thu, 2 Nov 2000, Petr Vandrovec wrote:
> Yes, it can happens. It for sure happens in ncpfs - as ncpfs uses > ping-pong protocol, and I'm lazy to use different thing than semaphore, > connection to server is guarded by semaphore.
If you use a rw semaphore taken for writing by two writers, it will alternate between the two because the second writer will bias the lock (its next state is predetermined when the second writer goes to sleep). This is also true for the mix of reader -> writer and writer -> reader.
-ben
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |