Questions tagged [ipc]

IPC stands for Inter-process Communication and represents a set of methods for exchanging data and messages between threads and processes.

In computing, Inter-process communication (IPC) is a set of methods for the exchange of data among multiple threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC methods are divided into methods for:

  • message passing
  • synchronization
  • shared memory, and
  • remote procedure calls (RPC).

The method of IPC used may vary based on the bandwidth and latency of communication between the threads, and the type of data being communicated.

There are several reasons for providing an environment that allows process cooperation:

  • Information sharing
  • Speedup
  • Modularity
  • Convenience
  • Privilege separation

IPC may also be referred to as inter-thread communication and inter-application communication.

The combination of IPC with the address space concept is the foundation for address space independence/isolation.

4538 questions
41
votes
4 answers

Socketpair() in C/Unix

I have 2 applications on the same system that I need to communicate back and forth. From my research I believe this is called Inter Process Communication and the use of socketpair() is the best method for my problem. I am tearing my hair out…
NASA Intern
  • 823
  • 3
  • 11
  • 19
40
votes
1 answer

Fastest IPC method on Windows 7

What is the fastest possible Interprocess Communication (IPC) method on Windows 7? We would like to share only a memory blocks (two-way). Is it ReadProcessMemory or something else? We would like to use plain C but, for example, what does Boost…
Cartesius00
  • 23,584
  • 43
  • 124
  • 195
34
votes
3 answers

What is the difference between Socket and RPC?

What is the actual difference between Socket and RPC (Remote Procedure Call)? As per my understanding both's working is based on Client–server model. Also which one should be used in which conditions? PS: Confusion arise while reading Operating…
roottraveller
  • 7,942
  • 7
  • 60
  • 65
34
votes
11 answers

blocks - send input to python subprocess pipeline

I'm testing subprocesses pipelines with python. I'm aware that I can do what the programs below do in python directly, but that's not the point. I just want to test the pipeline so I know how to use it. My system is Linux Ubuntu 9.04 with default…
nosklo
  • 217,122
  • 57
  • 293
  • 297
32
votes
5 answers

Efficient Python to Python IPC

What would be an inter-process communication (IPC) framework\technique with the following requirements: Transfer native Python objects between two Python processes Efficient in time and CPU (RAM efficiency irrelevant) Cross-platform Win\Linux Nice…
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
32
votes
3 answers

Best way to do interprocess communication on Mac OS X

I'm looking at building a Cocoa application on the Mac with a back-end daemon process (really just a mostly-headless Cocoa app, probably), along with 0 or more "client" applications running locally (although if possible I'd like to support remote…
jbrennan
  • 11,943
  • 14
  • 73
  • 115
31
votes
3 answers

Difference between Mutex, Semaphore & Spin Locks

I am doing experiments with IPC, especially with Mutex, Semaphore and Spin Lock. What I learnt is Mutex is used for Asynchronous Locking (with sleeping (as per theories I read on NET)) Mechanism, Semaphore are Synchronous Locking (with Signaling and…
Novice
  • 540
  • 2
  • 8
  • 21
30
votes
9 answers

How do I run a Perl script from within a Perl script?

I've got a Perl script that needs to execute another Perl script. This second script can be executed directly on the command line, but I need to execute it from within my first program. I'll need to pass it a few parameters that would normally be…
cbowns
  • 6,295
  • 5
  • 47
  • 64
29
votes
4 answers

In Node.js, how do I make one server call a function on another server?

Let's say I have 2 web servers. Both of them just installed Node.js and is running a website (using Express). Pretty basic stuff. How can Server-A tell Server-B to execute a function? (inside node.js) Preferably...is there a npm module for this…
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
29
votes
3 answers

D-Bus equivalent for Windows

Anyone know of a Linux/D-Bus sort of mechanism for Windows? Thanks
sharkin
  • 12,162
  • 24
  • 86
  • 122
29
votes
4 answers

What's the practical limit on the size of single packet transmitted over domain socket?

Let us assume that there is a Unix domain socket created for a typical server-client program. The client sends a 10GB buffer over the socket and it is consumed by the server in the meanwhile. Does OS (Linux/BSD) split the 10GB buffer into many…
user972946
29
votes
5 answers

Performance difference between IPC shared memory and threads memory

I hear frequently that accessing a shared memory segment between processes has no performance penalty compared to accessing process memory between threads. In other words, a multi-threaded application will not be faster than a set of processes using…
Robert Kubrick
  • 8,413
  • 13
  • 59
  • 91
28
votes
6 answers

Writing a privileged helper tool with SMJobBless()

Even though the API has been open since Mac OS X Leopard, there's surprisingly, and unfortunately, very little documentation on how to correctly use SMJobBless() for creating privileged helper tools. There are a lot of gotchas, even when copying…
Itai Ferber
  • 28,308
  • 5
  • 77
  • 83
28
votes
3 answers

Which is better for local IPC, POSIX message queues (mqueues) or Unix domain (local) sockets?

Is it better to use POSIX message queues or Unix domain sockets for local IPC communication? I have worked with Unix sockets between machines (not domain) and I remember that making and breaking the connection would cause sockets to linger awhile…
John Rocha
  • 1,656
  • 3
  • 19
  • 30
28
votes
1 answer

how can I notify a running activity from a broadcast receiver?

I have an activity, it needs to response to a broadcast event. Since an activity can not be a broadcast receiver at the same time, I made a broadcast receiver. My question is: how can I notify the activity from the broadcast receiver? I believe this…
Henry
  • 942
  • 3
  • 11
  • 21