Every system has a maximum number of IPC objects that can be "stored". I have to create a set of semaphores that contains hundreds of semaphores. Now I have 2 questions: 1) are those semaphores counted as distinct IPC objects or a set of semaphores is counted by the system as a unique IPC object? 2) how many semaphores can a set of semaphores contain?
I solved the problem. Every system has obliviously a different maximum number of semaphore sets that can be stored. Using those command:
ipcs -ls
OR
cat /proc/sys/kernel/sem
you can see your system limits.
I find the answer in this page (Chapter 8 talks about my problem) https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html-single/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/index#chap-Oracle_9i_and_10g_Tuning_Guide-Setting_Shared_Memory