Message queues

Nicholas Jacobs nick at toro.UUCP
Sun Oct 15 08:32:29 AEST 1989


>Two questions about message queues in UNIX:
>
>our SUNS).  Then, with a key of 2505 the call msgget blow out with the
>message "Permission Denied".  That should not happen as I set the msgflag to
>reflect that (0000600).  Has anyone else seen this problem or aware of this
>
Question for you: does the message queue already exist? If it does with
0600 permission and you are not the owner, you will not be allowed to connect
to it.

>2. I am exploring the use of message queues instead of the traditional
>socket IPC operations.  The application involves a daemon-like program to
>rendezvous two other processes and I want to use the message queue facility
>to make synchronization possible.  I am interesting in evaluating on how
>much faster it would be to go this way.  Gut feeling indicates that message
>queues could be faster than passing UDP packets around and this might be
>because the UNIX kernel supports this facility better (and probably uses it).  
>
>Any ideas or comments !!
>
>Raghu

The only advantage you really get with SysV message queues is speed and
even that is questionable in most applications (i.e., the speed of memory
based message queues does not really affect your application much). The
disadvantages are considerable. The first is that they are limited to only
the machine you are running on, thus removing any possibility of transparent
network extensions. Also, since they do not map into the file system domain
they are not selectable, thus you have no asynchronous notification available.

We use message queues heavily since this is a SysV based project, but
given a choice I would use sockets rather than message queues.

Nicholas Jacobs
UUCP: ...!uunet!toro!nick Internet: toro!nick at uunet.uu.net
AT&T: (212) 236-3230



More information about the Comp.unix mailing list