System V IPC problems

Hi all,

Is there a situation like system assigning same ID's for semaphores and shared memory at the same time.

Ex: When I try to create 10 Shared memory objects with starting key as 0x1500 and 10 semaphore objects with starting key as 0x1234 in the same program. Assume those are not deleted while exting the program. So, we can see those with ipcs command. ipcs listed some of the shared memory objects and semaphores having the same ID's.

Is it a problem of kernel? It it causes problems what type of problems it will cause?

Can we have same ID's for semaphores and shared memory?

Please respond to me.

Thanks in advance
G K Reddy Chinthalapudi

A key used for a semaphore can be used for a shared memory as well.
System may assign same id for both these ipcs.
It is not a problem as we use different syscall to access each type of ipc(shmget,semget)

Thank you very much John