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
27
votes
3 answers

Sharing memory between processes through the use of mmap()

I'm in Linux 2.6. I have an environment where 2 processes simulate (using shared memory) the exchange of data through a simple implementation of the message passing mode. I have a client process (forked from the parent, which is the server) which…
Andrea Sprega
  • 2,221
  • 2
  • 29
  • 35
27
votes
1 answer

Create Named Pipe C++ Windows

I am trying to create a simple comunication between 2 processes in C++ ( Windows ) like FIFO in linux. This is my server: int main() { HANDLE pipe = CreateFile(TEXT("\\\\.\\pipe\\Pipe"), GENERIC_READ, 0, NULL, OPEN_EXISTING, …
user3052078
  • 487
  • 1
  • 8
  • 20
27
votes
3 answers

Share condition variable & mutex between processes: does mutex have to locked before?

I need to some little help to understand how to use condition variables in C to resolve an exercise. Here is a little example: #include #include #include #include #include #include…
SagittariusA
  • 5,289
  • 15
  • 73
  • 127
27
votes
1 answer

Exception in Thread:must be a sequence, not instance

Im working on python and im trying to execute a thread that takes 1 parameter "q", but when im trying to execute it a strange exception occurs, here's my code: class Workspace(QMainWindow, Ui_MainWindow): """ This class is for managing the whole…
karensantana
  • 1,599
  • 4
  • 21
  • 34
26
votes
4 answers

Every Activity in Android is a Process,or One Application is one process

In this page, http://androidapps.org.ua/androidintro_ipc.html , intent switching between activities is described as Inter Process Communication. Now I am confused whether every activity is a separate process in android or All activities inside an…
Naba
  • 503
  • 2
  • 9
  • 19
26
votes
7 answers

How to IPC between PHP clients and a C Daemon Server?

and thanks for taking a look at the question. The background I have several machines that continuously spawn multiple (up to 300) PHP console scripts in a very short time frame. These scripts run quickly (less than a second) and then exit. All of…
Alex Recarey
  • 20,178
  • 4
  • 25
  • 22
25
votes
2 answers

Why is it possible to write a boolean array to a parcel but not a boolean?

In the documentation for the Parcel it states a method exists public final void writeBooleanArray (boolean[] val) But there is no method for writeBoolean(boolean val) There also exists: public final void writeLong (long val) public final void…
rogermushroom
  • 5,486
  • 4
  • 42
  • 68
25
votes
3 answers

How to transfer files between Android applications running on the same device?

I am writing an Android application that interfaces with a RESTful service. This web service essentially fronts a file system, and provides metadata as well CRUD access to the files. My application retrieves the metadata, and exposes it to 3rd…
Eric Levine
  • 13,536
  • 5
  • 49
  • 49
25
votes
2 answers

How do you do interprocess communication (IPC) in Rust?

Is there part of the standard library for this? I've been digging around, but I can't see anything immediately obvious that implements it, or anything on Process that would let you do this? Did I miss it? Or do I have to do some C-wrapper work for…
Doug
  • 32,844
  • 38
  • 166
  • 222
24
votes
3 answers

Is possible to use Mac OS X XPC like IPC to exchange messages between processes? How?

According to Apple, the new XPC Services API, introduced in Lion, provides a lightweight mechanism for basic interprocess communication integrated with Grand Central Dispatch (GCD) and launchd. It seems possible to use this API as a kind of IPC,…
poorDeveloper
  • 495
  • 2
  • 6
  • 11
24
votes
2 answers

Implement signature-level security on Android services with more than one allowed signature

I'm developing on an application at the moment which contains quite a lot of personal user information - things like Facebook contacts, etc ... Now, one of the things I want to be able to do (and have done, quite effectively) is open up parts of the…
jelford
  • 2,625
  • 1
  • 19
  • 33
24
votes
8 answers

Use SharedPreferences on multi-process mode

I've defined an instance of SharedPreferences that used on multi-process mode. public class Prefs { private static SharedPreferences prefs; private static SharedPreferences.Editor editor; private static void init(Context context) { …
Mousa Jafari
  • 677
  • 1
  • 6
  • 21
24
votes
1 answer

difference between MPI_Send() and MPI_Ssend()?

I know MPI_Send() is a blocking call ,which waits until it is safe to modify the application buffer for reuse. For making the send call synchronous(there should be a handshake with the receiver) , we need to use MPI_Ssend() . I want to know the…
Ankur Gautam
  • 1,412
  • 5
  • 15
  • 27
24
votes
3 answers

Shared memory vs. Go channel communication

One of Go's slogans is Do not communicate by sharing memory; instead, share memory by communicating. I am wondering whether Go allows two different Go-compiled binaries running on the same machine to communicate with one another (i.e.…
artur
  • 910
  • 1
  • 9
  • 14
23
votes
1 answer

Can't get ZeroMQ python bindings to receive messages over IPC

I'm trying to achieve PUB/SUB over IPC. If I changed the code below so that the subscriber binds to "tcp://*:5000" and the publisher connects to "tcp://localhost:5000" it works, but I can't get it to work over IPC. What am I doing…
Kit Sunde
  • 35,972
  • 25
  • 125
  • 179