Sys V Semaphores vs. POSIX Semaphores??

Sys V Semaphores vs. POSIX Semaphores??

Post by Roque Soli » Fri, 24 Jul 1998 04:00:00

We have a need for a very "fast" hardware locking mechanisms for a high
speed OLTP system.  This mechanism must not only be very "fast" (several

thousand locks/unlocks per second), but it should be scale well.  A
typical multi-cpu machine will have about four to six processes
(multi-threaded), all accessing/setting these locks.  We're getting
conflicting stories from about which is faster, System V or POSIX
semaphores under Solaris.  If anyone has crossed this path before, I'd
appreciate any information, if benchmarks have already been done, I'd
appreciate it I can get a copy of the code used during those benchmarks.

Thanks in advance,
Roque Solis
Systems Engineer - The SABRE Group


1. Posix vs SystemV semaphores

I want to use semaphores with process sharing under Linux RH 6.2.
I'm currently using sem_init() as a POSIX semaphore under a Linux
system and with a parameter to decide to use process sharing or not.

It seems that I have some problems with it anyway. I don't know why.
I've got the information from one source that POSIX semaphores don't
work with process sharing, is that true?

This call (sem_init) is described as a POSIX semaphore. Should I use
the SystemV semaphores (semctl, semop) ?

Is POSIX semaphores only an API on top of SystemV implementation or is
it completly different implementation?

Does somebody know if something changed between RH6.1 (2.2.5) and RH 6.2
(2.2.14) because my program was working fine with 6.1

Thanks for your help/time.


               Stephane Richard
 Kasenna Inc.         Redefining Broadband Video!

Sent via
Before you buy.


3. Increasing # of semaphores in semaphore set?

4. Linux programming - Help wanted

5. posix named semaphore value not reflected across process

6. help --- can't recover "fsck" after power off without "init 0"

7. %!@# Help Posix semaphores & mmap

8. How do I build a library with other libraries ?

9. POSIX Namned Semaphore

10. using Posix/SystemV semaphores under Linux RH 6.2

11. POSIX semaphores and Kernel 2.4.7, glibc 2.2.4 (RedHat 7.2)

12. POSIX.4 Semaphore questions

13. Missing POSIX semaphore library?