From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 14 18:11:30 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 77C6416A4CE for ; Tue, 14 Dec 2004 18:11:30 +0000 (GMT) Received: from web52708.mail.yahoo.com (web52708.mail.yahoo.com [206.190.39.159]) by mx1.FreeBSD.org (Postfix) with SMTP id 0164E43D3F for ; Tue, 14 Dec 2004 18:11:30 +0000 (GMT) (envelope-from kamalpr@yahoo.com) Received: (qmail 97828 invoked by uid 60001); 14 Dec 2004 18:11:28 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=ItAoAr3Zc4HwR5xKzBaGnpsMmZJ40u+unzn/99yRcYZf0t/hQJPnKJSZ4k8iztnXnyNnuMtbtw6R8B2FmRmODramS7wmMwlagGdTOpxFRr/LglGZ67vTTxGJaqd14zu9humZwy/DbxY3rWTMEt1P2YVibvb4zjVTuqr1fCg9KIY= ; Message-ID: <20041214181128.97826.qmail@web52708.mail.yahoo.com> Received: from [202.142.94.194] by web52708.mail.yahoo.com via HTTP; Tue, 14 Dec 2004 10:11:28 PST Date: Tue, 14 Dec 2004 10:11:28 -0800 (PST) From: "Kamal R. Prasad" To: Joe Kelsey In-Reply-To: <1103047196.30309.254.camel@zircon.zircon.seattle.wa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-hackers@freebsd.org Subject: Re: Fixing Posix semaphores X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kamalp@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2004 18:11:30 -0000 --- Joe Kelsey wrote: > On Tue, 2004-12-14 at 08:08 -0800, Kamal R. Prasad > wrote: > > --- 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. > > > > From the opengroup website:- > > > > > http://www.opengroup.org/onlinepubs/7990989775/xsh/sem_open.html > > > > "It is unspecified whether the name appears in the > > file system and is visible to functions that take > > pathnames as arguments. " > > > > >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? > > > > > > > You need to allow the user to provide a fully > > qualified pathname as an argument -and if the > > implementation doesn't allow that, that would be a > > BUG. But requiring the supplied name to be a valid > > pathname is not mandated by the std. > > The current implementation FAILS to allow arbitrary > pathnames. The > current implementation arbitrarily restricts the > name to a string of not > more than 14 characters optionally starting with a > slash. This does not > match pathnames on FreeBSD. > > Yes, I agree that the standard does not require > pathnames, but it does > say that the name can match the otherwise > standardized pathname syntax > (at least the POSIX pathname standard). The FreeBSD > implementation > clearly FAILS to allow POSIX pathnames. > Yeah -so the only fix for ensuring compliance is that it allow a POSIX pathname as an argument. Many of the posix requirements are a result of bending backwards to deal with badly designed operating systems. It doesn't mean that doing things their way [in this case coupling the semaphore implementation to the filesystem] can actually improve the OS. > > BTW -how would > > you deal with a diskless workstation running > Freebsd? > > Why does this matter? If the system uses NFS, then > all bets are off. > If the system contains a FreeBSD file system, thenit > works. What other > choice could there ever be? > something like boot from flash/eeprom. I don't know about freebsd as an instance -but many networking devices do use netbsd that way. For the most part, you wouldn't want to create a file on such a system. regards -kamal > /Joe > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com