named vs unnamed ipc objects

Hi,
Though this question is very basic, but I have the doubt. So please help
me to clear my doubt.

In IPC there is named and unnamed version of objects like
pipe,semaphore,shared memory.So please tell me the specific cases where we
can use a named version or unnamed version only whichever is applicable.

Thanking you in advance.

With Regards
Jitendra Sasmal

“Jitendra Sasmal” <sasmal_jk@rediffmail.com> wrote in message
news:bqk236$4pg$1@tiger.openqnx.com

Hi,
Though this question is very basic, but I have the doubt. So please help
me to clear my doubt.

In IPC there is named and unnamed version of objects like
pipe,semaphore,shared memory.So please tell me the specific cases where we
can use a named version or unnamed version only whichever is applicable.

You can only use unnamed mechanisms between processes that have some common
ancestry (usually parent and child), so they can inherit the same unnamed
objects. Otherwise they have no way of obtaining a ‘handle’ for that ipc
object.

That said, you can combine some methods. For objects that use handles in
form of pointers (e.g., semaphores) you can put unnamed objects into a named
shared memory region and that way get access to them from unrelated
processes.

Unnamed semaphores are much faster in QNX, which makes this case important.
Other IPC objects don’t really have any difference in speed between named
and unnamed variants.

– igor