Which is better Linux IPC--- http://stackoverflow.com/questions/404604/comparing-unix-linux-ipc
Shared memory can be the most efficient since you build your own communication scheme on top of it, but it requires a lot of care and synchronization. Solutions are available for distributing shared memory to other machines too.
Pipe I/O is the fastest but needs a parent/child relationship to work.
Sockets are the most portable these days, but require more overhead than pipes. The ability to transparently use sockets locally or over a network is a great bonus.
Message queues and signals can be great for hard real-time applications, but they are not as flexible.
These methods were naturally created for communication between processes, and using multiple threads within process can complicate things -- especially with signals.
http://tldp.org/LDP/tlk/ipc/ipc.html
ReplyDeletehttp://tldp.org/LDP/lpg/node7.html
Mainly used IPC mechanisms are Pipes,Signal & sockets.Also System V IPC mechanisms are Semaphores,Shared memory & message queues
Which is better Linux IPC---
ReplyDeletehttp://stackoverflow.com/questions/404604/comparing-unix-linux-ipc
Shared memory can be the most efficient since you build your own communication scheme on top of it, but it requires a lot of care and synchronization. Solutions are available for distributing shared memory to other machines too.
Pipe I/O is the fastest but needs a parent/child relationship to work.
Sockets are the most portable these days, but require more overhead than pipes. The ability to transparently use sockets locally or over a network is a great bonus.
Message queues and signals can be great for hard real-time applications, but they are not as flexible.
These methods were naturally created for communication between processes, and using multiple threads within process can complicate things -- especially with signals.