From owner-freebsd-net Fri Jul 12 5:28:36 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 635FF37B400 for ; Fri, 12 Jul 2002 05:28:33 -0700 (PDT) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59A7143E58 for ; Fri, 12 Jul 2002 05:28:32 -0700 (PDT) (envelope-from keramida@ceid.upatras.gr) Received: from hades.hell.gr (patr530-a107.otenet.gr [212.205.215.107]) by mailsrv.otenet.gr (8.12.4/8.12.4) with ESMTP id g6CCSGHw018569; Fri, 12 Jul 2002 15:28:17 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.5/8.12.5) with ESMTP id g6CCSF9J052866; Fri, 12 Jul 2002 15:28:15 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from charon@localhost) by hades.hell.gr (8.12.5/8.12.5/Submit) id g6CCSDee052865; Fri, 12 Jul 2002 15:28:13 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 12 Jul 2002 15:28:12 +0300 From: Giorgos Keramidas To: Bosko Milekic Cc: Jon Mini , Alfred Perlstein , Archie Cobbs , Julian Elischer , Luigi Rizzo , freebsd-net@FreeBSD.ORG Subject: Re: mbuf external buffer reference counters Message-ID: <20020712122811.GA52803@hades.hell.gr> References: <20020711222725.A5284@unixdaemons.com> <200207120519.g6C5JoH36140@arch20m.dellroad.org> <20020712064104.GG97638@elvis.mu.org> <20020712112653.GS55378@elvis.mu.org> <20020712074507.B75547@unixdaemons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020712074507.B75547@unixdaemons.com> X-Operating-System: FreeBSD 5.0-CURRENT i386 X-PGP-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 X-Phone: +30-944-116520 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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