Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Sep 2004 00:07:25 +0300
From:      Giorgos Keramidas <keramida@linux.gr>
To:        Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: fine grained locking and traversing linked lists
Message-ID:  <20040903210725.GA1199@gothmog.gr>
In-Reply-To: <4138BE8D.7000102@savvis.net>
References:  <4138BE8D.7000102@savvis.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-09-03 11:57, Maksim Yevmenkin <maksim.yevmenkin@savvis.net> wrote:
>
> so, i've written a "spherical cow" that shows fine grained locking
> when traversing linked lists (see below). basically, for double linked
> list, in order to safely manipulate by object "y" one must hold three
> locks: object "y" lock, object "x = y->previous" lock and object "z =
> y->next" lock.
>
> so, the $1 million question is: am i missing something? or this will work?

See ``the dining philosophers problem'' at Google.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040903210725.GA1199>