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
2
votes
0 answers

QSharedMemory and QLocalSocket: performance questions

I'm looking for IPC with high performance in Qt (v5.3) on Windows. In my final situation, I will have 3 (or more) producer process and one consumer process. Before that, I made some tests using 1 producer thread and 1 consumer thread, using both…
arthur86
  • 531
  • 1
  • 3
  • 20
2
votes
2 answers

How to wait on a system process from a user process?

I have a .net Windows Service running as Local System. I have another .net process that needs to wait for the service to terminate. That process does not know the service name so it can't query the service control manager. It does know the service…
Andrew Savinykh
  • 25,351
  • 17
  • 103
  • 158
2
votes
0 answers

IPC between Node.js and Arduino Sketch on Intel Galileo

I want to communicate between a Node.js server and an Arduino Sketch. I discovered that there are three ways to do it: Files UDP IPC I can probably implement files, but I need to read sensor values and send them to Node.js, and this seems slow and…
xyz
  • 3,349
  • 1
  • 23
  • 29
2
votes
1 answer

Who can share shared memory in Linux?

I am working on hardening a sandbox for student code execution. I think I'm satisfied that students can't share data on the file system or with signals because I've found express rules dictating those and they execute as different unprivileged…
daveagp
  • 2,599
  • 2
  • 20
  • 19
2
votes
1 answer

*nix: "echo 'start working' > /etc/.example" : how is this implemented?

Say someone executes the following in a terminal: echo 'start working' > /etc/.example and when this is executed, the example program would "start working." On UNIX(-like) systems, how would something like that be implemented, and what is this kind…
Yktula
  • 14,179
  • 14
  • 48
  • 71
2
votes
2 answers

Flushing a pipe (os.pipe) before closing

I need to launch a subprocess and enable two threads for reading its stdout and stderr respectively. The following code is just considering stdout: def reader(rfd): while True: try: data = os.read(rfd, bufsize) except…
Dacav
  • 13,590
  • 11
  • 60
  • 87
2
votes
0 answers

Android - "service list" vs "dumpsys activity services"

What are the differences between the services shown by these commands? How can I start a Service from normal Java classes and see it in "service list" to be able to access it from another native process to share data? I have a native (C/C++ Code)…
user3387542
  • 611
  • 1
  • 8
  • 28
2
votes
0 answers

IPC between C# and C++ using named pipes

I have a C++ server application and C# client application, and I want them to communicate with each other using named pipes mechanism. I want to use a multithreded server (each tread will service a client), I found a working code here:…
Yan4321
  • 329
  • 1
  • 5
  • 17
2
votes
0 answers

Allow other Apps to bind to a service, but not create it

I have an activity that gets some user input and puts that information as extra into an intent to start (create) a service. I then want other apps to be able to use that service (bind to it). I, however, do NOT want these apps to be able to start…
BeneStr
  • 337
  • 2
  • 12
2
votes
3 answers

Recommendations for IPC between parent and child processes in .NET?

My .NET program needs to run an algorithm that makes heavy use of 3rd party libraries (32-bit), most of which are unmanaged code. I want to drive the CPU as hard as I can, so the code runs several threads in parallel to divide up the work. I find…
Jeremy
  • 3,484
  • 3
  • 22
  • 25
2
votes
1 answer

mmap() for shared memory and threads

I am having the following C function: int ipc_test(char *tstr) { int *x = mmap(0, 4, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0); if(fork() == 0) { *x = getpid(); exit(0); } else { int status; …
Santhosh N
  • 157
  • 10
2
votes
2 answers

Can I place a std::atomic in shared memory and expect atomic operation?

Does std::atomic play well in shared memory, or is it undefined? It seems like an easy way to add lockless basic types to shared memory however I could believe that it's not possible to guarantee atomic behaviour in the context of shared memory.
Joe
  • 7,378
  • 4
  • 37
  • 54
2
votes
0 answers

Sharing a memory map simultaneously between processes

After overcoming some other difficulties, I'm now stuck with this (probably simple) problem. My goal: Multiple instances of my application are running and performing operations (read & write) on the same file at the same time Solution (what I want…
user4520
  • 3,401
  • 1
  • 27
  • 50
2
votes
1 answer

Using TCP for Inter Process Communication(IPC) with fortran

I am working on creating a way to have multiple Fortran processes communicate with each other. This will be for a simulation where one machine is running the simulation processes and another machine (or possibly cluster of machines) will be…
Andrew
  • 693
  • 6
  • 19
2
votes
2 answers

linux - 1-to-many communication between processes

I am trying to find a way to do 1-to-many communication between processes in Linux. I found that linux has named pipes, but those won't work with multiple readers (I found on other SO answers that once a reader reads some data, others don't get it);…
Jake
  • 16,329
  • 50
  • 126
  • 202