Date: Fri, 12 Jul 2002 15:28:12 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Bosko Milekic <bmilekic@unixdaemons.com> Cc: Jon Mini <baka@elvis.mu.org>, Alfred Perlstein <bright@mu.org>, Archie Cobbs <archie@dellroad.org>, Julian Elischer <julian@elischer.org>, Luigi Rizzo <rizzo@icir.org>, freebsd-net@FreeBSD.ORG Subject: Re: mbuf external buffer reference counters Message-ID: <20020712122811.GA52803@hades.hell.gr> In-Reply-To: <20020712074507.B75547@unixdaemons.com> References: <20020711222725.A5284@unixdaemons.com> <200207120519.g6C5JoH36140@arch20m.dellroad.org> <20020712064104.GG97638@elvis.mu.org> <20020712112653.GS55378@elvis.mu.org> <20020712074507.B75547@unixdaemons.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020712122811.GA52803>