Process shared semaphores (Pthreads)

Process shared semaphores (Pthreads)

Post by D. Emilio Grimaldo Tuno » Sat, 06 Feb 1999 04:00:00



Hi *,
   Anybody knows when on earth Linux's PThreads (LinuxThreads/glib)
is going to support process-shared semaphores and p-s
condition variables? I am looking for 'drop-in' replacement for
the pthread_mutexattr_setpshared() and pthread_condattr_setpshared()
functions.

Also, these functions are Optional in the POSIX standard, but
they are required in the Unix98 standard, since kernel 2.2 is
supposed to have some (most? all?) Unix98 conformance, I wonder
if 2.2 does support these two problem-makers?

                TIA,
                                Emilio
--
*** The opinions expressed hereby are mine and not my employer's ***

 
 
 

Process shared semaphores (Pthreads)

Post by David Wrag » Sat, 06 Feb 1999 04:00:00



Quote:>    Anybody knows when on earth Linux's PThreads (LinuxThreads/glib)
> is going to support process-shared semaphores and p-s
> condition variables? I am looking for 'drop-in' replacement for
> the pthread_mutexattr_setpshared() and pthread_condattr_setpshared()
> functions.

I'm not aware of anyone working on it. Putting inter-process
synchronization facilities into a threads standard always seemed ugly
to me.

Perhaps you could implement them on top of the SysV IPC facilities, or
just convert your code to use SysV IPC?

Quote:> Also, these functions are Optional in the POSIX standard, but
> they are required in the Unix98 standard, since kernel 2.2 is
> supposed to have some (most? all?) Unix98 conformance, I wonder
> if 2.2 does support these two problem-makers?

Unix98 conformance is a general goal, so if you or someone else does a
nice implementation of the process-shared pthreads facilities, there
should be a good chance of getting it integrated into
glibc/linuxthreads/Linux. But Unix98 conformance will only be achieved
in the areas people care enough about to work on, and full Unix98
conformance will never happen (e.g. STREAMS/TLI).

Dave Wragg

 
 
 

1. shared memory semaphores / pthread mutexes?

Does AIX support a 'shared memory semaphore' or mutex for pthreads?

That is, I want to map a memory segment as shared between two or more
tasks. Then, I want to synchronize some user mode pthreads running in the
different task spaces using a mutex allocated in the shared segment.

Does AIX 4.1.4 and/or any later version support this?

If not can someone suggest the most efficient way of synchronizing
multiple threads in different tasks which need to access some shared
memory data or otherwise communicate some shared data between the tasks?

Email responses appreciated.

Thanks!
--Michael

2. Xwindows "global"/default font change

3. process shared semaphores

4. OpenOffice multiple printers again

5. sharing Pthread mutexes among processes

6. Xconfigurator

7. a process notice other processes by semaphore

8. X.25 over Ethernet on Solaris

9. Can a process signal a semaphore that is waited by a diff. process?

10. Are pthreads' semaphores supposed to do this or is it a Linux bug?

11. pthreads and semaphores

12. pthread - threads and semaphores - help!

13. Solaris 10: Increasing the process data space; shared memory segments & intimate shared memory problems