On 2002-07-12 07:45 +0000, Bosko Milekic wrote:
> The jist of the problem is that when you want to say, remove yourself
> from the list, you have to:
>
> 1) your "next"'s back pointer to your "back" pointer
> 2) your "Prev"'s next pointer to your "next" pointer
>
> So that's two operations but for all you know your "next" or your
> "back" may be doing the same thing to you at the same time.  As far as
> I know, you can't (intuitively) figure out a way to do both of these
> atomically. i.e., maybe you'll set your next's back pointer to whatever
> you have in `back' but then your `back' guy will set your back pointer
> to whatever he has in `back' and then your next guy's back pointer will
> be invalid, for example.
>
> So I guess that what we're dealing with isn't really a
> "monodirectional" ring.  Right?

No it isn't.  It looks more like the "dining philosophers" problem.
But that problem's solution would require at least one mutex for every
part of the ring :-(


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to