Kernel [memory] tweaking question
Robert Watson
rwatson at FreeBSD.org
Thu Apr 7 12:09:05 PDT 2005
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
More information about the freebsd-hackers
mailing list