Re: [question] Linux read/write spinlocks and readers starving a writer

From: Lennert Buytenhek (buytenh@gnu.org)
Date: Mon Jun 26 2000 - 13:02:08 EST


On Mon, 26 Jun 2000, Tigran Aivazian wrote:

> Hi guys,
>
> I know that Linux read-write semaphores implementation is quite clever
> with respect to putting the new readers to queue behind the waiting
> writer. Now, is something similar true for read-write spinlocks also?
>
> I.e. if I have a reader holding the lock and a writer busy trying to get
> it and then another bunch of readers trying to get it at the same time,
> can all these readers sneak in and get the lock before the writer does
> thus potentially letting the read-only access to a data structure starve
> the (more important) write access?

It was pointed out to me a while ago by Manfred Spraul that this has some
complications (will cause deadlocks if you don't make a few other changes
as well).

http://marc.theaimsgroup.com/?l=linux-kernel&m=93522788507225&w=2

greetings,
Lennert

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:10 EST