From owner-freebsd-arch@FreeBSD.ORG Wed Dec 22 01:39:43 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35CF516A4CE for ; Wed, 22 Dec 2004 01:39:43 +0000 (GMT) Received: from zircon.seattle.wa.us (dsl231-043-165.sea1.dsl.speakeasy.net [216.231.43.165]) by mx1.FreeBSD.org (Postfix) with SMTP id 0B92443D54 for ; Wed, 22 Dec 2004 01:39:41 +0000 (GMT) (envelope-from joe@zircon.seattle.wa.us) Received: (qmail 76751 invoked from network); 22 Dec 2004 01:40:19 -0000 Received: from localhost (HELO localhost.zircon.seattle.wa.us) (127.0.0.1) by localhost with SMTP; 22 Dec 2004 01:40:19 -0000 From: Joe Kelsey To: Robert Watson In-Reply-To: References: Content-Type: text/plain Date: Tue, 21 Dec 2004 17:40:19 -0800 Message-Id: <1103679619.30309.792.camel@zircon.zircon.seattle.wa.us> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit cc: arch@freebsd.org Subject: Re: Fixing Posix semaphores X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2004 01:39:43 -0000 On Wed, 2004-12-22 at 00:01 +0000, Robert Watson wrote: > On Mon, 13 Dec 2004, Joe Kelsey wrote: > > > I have a desire to fix posix semaphores in at least 5.3. The current > > implementation doesn't actually follow the "spirit" of the standard, > > even though it technically qualifies in a somewhat degraded sense. I > > refer to the fact that the current implementation treats posix > > semaphores as completely contained inside the kernel and essentially > > divorced from the filesystem. The true "spirit" of the standard places > > the semaphores directly in the file system, similar to named pipes. > > However the current implementation treats the supplied "name" as a > > 14-character identifier, required to begin with a slash and contain no > > other slashes. Pretty weak. > > > > Well, in order to fix this, we need to add file system code and come up > > with a new type. I currently have some time to spend on something like > > this and am willing to put in whatever effort it takes. Does anyone > > want to add their own ideas or requirements? > > From my perspective, the biggest win here is that it would permit > different name spaces to trivially exist using multiple mountpoints of a > "semfs". This would make it easy to allow applications in different jails > to use identical names without colliding. This is the first really good idea I have seen in this discussion. Thank you very much. > FWIW, my only experience with POSIX semaphores on a system other than > FreeBSD is on Darwin, where a similar model is used to that on FreeBSD: a > flat kernel-maintained name space is present. It doesn't matter. No one uses named semaphores right now anyway, so name space issues simply do not exist. As soon as we come up with a reasonable idea and implementation, others will follow. /Joe