using Posix/SystemV semaphores under Linux RH 6.2

using Posix/SystemV semaphores under Linux RH 6.2

Post by Stephane Richar » Wed, 27 Sep 2000 04:00:00



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.

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

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.

Stef.

--
_________________________________________________
               Stephane Richard
 Kasenna Inc.         Redefining Broadband Video!

--
_________________________________________________
               Stephane Richard
 Kasenna Inc.         Redefining Broadband Video!

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

using Posix/SystemV semaphores under Linux RH 6.2

Post by Allison Baj » Thu, 28 Sep 2000 04:00:00


I had this same problem a few months back.  Basically the POSIX
implementation of semaphores in RH 6.2 does not support process sharing.

I ended up using the System V semaphores.  I emailed the original author of
POSIX semaphores and asked why this was so.  He replied back saying that it
would be very difficult to make it process shareable.

There is a limitation however in the System V semaphores.  You might want to
increase the maximum number of semaphore identifiers in the following file:

/usr/src/linux/include/linux/sem.h

Change the following line to increase the maximum number of semaphore
identifiers. (Only if you need to).

#define SEMMNI 128    /* ? max # of semaphore identifiers */

Hope this informatio helps.

- Allison


> 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.

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

> 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.

> Stef.

> --
> _________________________________________________
>                Stephane Richard
>  Kasenna Inc.         Redefining Broadband Video!

> --
> _________________________________________________
>                Stephane Richard
>  Kasenna Inc.         Redefining Broadband Video!

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

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.

Stef

--
_________________________________________________
               Stephane Richard
 Kasenna Inc.         Redefining Broadband Video!

Sent via Deja.com http://www.deja.com/
Before you buy.

2. RS6000 RS/6000 IBM 7046-B50 9.1GB 128MB Rack

3. Gnome using DHCP client and hostname resolver problem using RH 6.2

4. Creative Ensoniq AudioPCI Model CT4810?

5. New: i386 NUMA does not work on non x440/Summit

6. root access using rpc.statd under RH Linux 6.2

7. IP Masquerading

8. POSIX Semaphores under RH 6.0

9. Sys V Semaphores vs. POSIX Semaphores??

10. RH 6.2->7.3: empty headers: linux/config.h, linux/malloc.h and linux/slab.h

11. Using semaphores to block POSIX threads

12. HELP - Using PCNet LAN module with RH 6.2