Re: Inter process communication

New Message Reply Date view Thread view Subject view Author view

Kenneth B Russell (kbrussel++at++media.mit.edu)
Fri, 6 Nov 1998 08:46:48 -0500 (EST)


> I need to pass data between a performer process and other that has
> nothing to do with performer. I have thought about using messages queues
> between both procesess, with the inter process communication library of
> Unix System V. The problem is that I haven't found the library installed
> in my machine, and don't know if the library is part of the OS dist
> cd's.

"versions long | grep mqueue" on our 6.5 machine shows that
/usr/include/mqueue.h is in irix_dev.sw.headers. Probably comes
on the base compiler CDs.

> I would appreciate if someone could tell me where are located the SysV
> IPC libraries, or if Irix React functions are appropiate to do inter
> procesess communication stuff. Other suggestions on using another
> approaches(such as shared mem, etc), will be welcome.

Rather than directly using OS-level message queues, I would
recommend attaching a piece of shared memory to both processes
and writing a small C++ class to turn it into a bi-directional
queue. This approach is faster (probably), more portable and
amenable to implementation on more than one underlying IPC
mechanism (i.e., sockets). Of course you could do this on top of
message queues as well. Try "man shmget shmat" for a start.
W. Richard Stevens' book "Advanced Programming in the Unix
Environment" (published by Addison-Wesley) is a great reference
for shared memory, sockets, and semaphores.

-Ken

__________________________________________________________________________
Kenneth B. Russell Synthetic Characters Group, MIT Media Lab
kbrussel++at++media.mit.edu http://www.media.mit.edu/~kbrussel


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Nov 06 1998 - 05:46:53 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.