which is faster?message or shared memory

hi, all,

As we know, message is the only kind of IPC method that realizes in the QNX
kernel.But i have a question here: is these method faster than the shared
memory on the local node?

regards,


ycao

Hi.

As far as I know shared memory is faster than message passing. We mainly
use shared memory because we have a large number of processes which need to
access large amounts of memory.

On the other hand, shared memory is local to the node and message passing is
not. But I guess if you go across the node, memory access will be very slow
compared to memory access on the node.

Augie

“ycao” <ycao@mail.ipp.ac.cn> wrote in message
news:am62cf$mt2$1@inn.qnx.com

hi, all,

As we know, message is the only kind of IPC method that realizes in the
QNX
kernel.But i have a question here: is these method faster than the shared
memory on the local node?

regards,


ycao


\

ycao <ycao@mail.ipp.ac.cn> wrote:

hi, all,

As we know, message is the only kind of IPC method that realizes in the QNX
kernel.But i have a question here: is these method faster than the shared
memory on the local node?

regardless rate, message passing is recommended anyway. Andy

regards,

ycao

“ycao” <ycao@mail.ipp.ac.cn> wrote in message
news:am62cf$mt2$1@inn.qnx.com

hi, all,

As we know, message is the only kind of IPC method that realizes in the
QNX
kernel.But i have a question here: is these method faster than the shared
memory on the local node?

No they are not, but if you Send() big chunks of data is almost as fast as a
memcpy. Of course shared memory will always be faster because data is not
copied!

regards,


ycao


\

In a past fast application I had success choosing shared memory rather than
ipc messaging to have access to a common set of variables among processes
within a node. I only had to use semaphores to keep the data integrity.

Oscar E. Soto

Control Adaptable SA de CV
Tel: +52 (81) 8340·0006
Fax: +52 (81) 8340·0014

“ycao” <ycao@mail.ipp.ac.cn> escribió en el mensaje
news:am62cf$mt2$1@inn.qnx.com

hi, all,

As we know, message is the only kind of IPC method that realizes in the
QNX
kernel.But i have a question here: is these method faster than the shared
memory on the local node?

regards,


ycao


\