From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 7 19:09:05 2005 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 B979616A4CE for ; Thu, 7 Apr 2005 19:09:05 +0000 (GMT) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49FC443D48 for ; Thu, 7 Apr 2005 19:09:05 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id 9AC9746B0E; Thu, 7 Apr 2005 15:09:04 -0400 (EDT) Date: Thu, 7 Apr 2005 20:09:33 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Zera William Holladay In-Reply-To: Message-ID: <20050407200537.Q29189@fledge.watson.org> References: <42518AC9.5070208@comcast.net> <3.0.1.32.20050405052601.00ab4388@pop.redshift.com> <20050407083639.GD57256@cirb503493.alcatel.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-hackers@freebsd.org Subject: Re: Kernel [memory] tweaking question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2005 19:09:05 -0000 On Thu, 7 Apr 2005, Zera William Holladay wrote: > On Thu, 7 Apr 2005, Peter Jeremy wrote: >> These are all reasonably well documented in sys/conf/NOTES. If you >> want more detail, try a SystemV-oriented Unix book >> >> Close - they only control SystemV shared memory. Sane shared memory >> is available via mmap(2). SystemV semaphores are controlled via >> SEMxxx options. Posix semaphores are listed as 'experimental'. > > Is there any chance that POSIX semaphores will be anything other than > experimental in the future, or is there no interest? Further, the man > page indicates that the FreeBSD, POSIX semaphore implementation is not > capable of supporting multiple process semaphores. I saw a similar note > on a Linux man page. I think this is a shame, since POSIX semaphores > seem to be well designed (from a user point of view) compared to SYSV > semaphores, which are a total mess. I haven't read the man page recently, but I've used our POSIX semaphores in an inter-process form successfully, and fixed a bug in them relating to fork relatively recently. My understanding is that some issues may remain in the handling of error cases when semaphore support isn't present -- whether the process is terminated, or gets ENOSYS, depending on whether the program is linked against libpthread or not. The fix for fork() handling will be present in 5.4-RELEASE. Robert N M Watson