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

Linux - c - ipc notification without context switch and low overhead?

Context : Linux 64bits. I am very well versed in shared memories, different IPCs mechanisms. Currently, I am seeking something that could be used in userspace to notify change between two polled processes, to save cpu cycles. I already know about…
Larry
  • 1,735
  • 1
  • 18
  • 46
2
votes
1 answer

unix message queue

Is there an ipc option to get the last message in message queue but not removing it? I want this to allow many clients reading same messages from the same server.. Edit: Server and clients are on the same machine! Thanks
Betamoo
  • 14,964
  • 25
  • 75
  • 109
2
votes
2 answers

Communicating between a parent and its children

Newbie question: On Unix, in a program with a parent and some children: - How can the parent alert the children efficiently to do some work.. ? - Or how can the children wait for parent signal to start doing some work? EDIT: This program tries to…
Betamoo
  • 14,964
  • 25
  • 75
  • 109
2
votes
4 answers

How to remove all the IPC-Message queue ?

Consider I have created a 100 messages queues using a msgget() function. ------ Message Queues -------- key msqid owner perms used-bytes messages 0x00000000 262144 bhuvaneshw 666 40 2 …
Bhuvanesh
  • 1,269
  • 1
  • 15
  • 25
2
votes
0 answers

How do R packages like RJags and RStan handle interprocess communication?

How do R packages that communicate with external programs like stan and jags handle the interprocess communication? I can imagine it's feasible with a system() call and/or input/output to files, but I'm guessing they do it in a more elegant way.
daj
  • 6,962
  • 9
  • 45
  • 79
2
votes
2 answers

R -> kdb: Pass R data to kdb+ as binary objects

What's the most efficient way to insert R objects (more specifically, time series expressed as xts or data.table objects, i.e. time-based and numeric columns) into a kdb+ database? I was able to locate only solution involving string serialization…
Daniel Krizian
  • 4,586
  • 4
  • 38
  • 75
2
votes
2 answers

Is mmap the best way to communicate between processes?

I use a file to communicate between Python and Ruby script. But, we have mmap. So here are my questions. Can I do the same thing (communicate between processes) with mmap? What advantage can mmap give us over physical file? Speedup? What would be…
prosseek
  • 182,215
  • 215
  • 566
  • 871
2
votes
1 answer

Shared Memory and Process Sempahores (IPC)

This is an extract from Advanced Liniux Programming: Semaphores continue to exist even after all processes using them have terminated. The last process to use a semaphore set must explicitly remove it to ensure that the operating system does not…
fsdfa
  • 353
  • 1
  • 2
  • 10
2
votes
2 answers

How to use mutexes in a shared memory forked process?

I'm sharing a counter variable between a multi-process program, where processes are created using the fork() call. I'm using the following code to create a shared memory where the counter is stored, and can be accessed and incremented by each…
tsar2512
  • 2,826
  • 3
  • 33
  • 61
2
votes
1 answer

Understanding the lifeline of linux pipe for ipc communication

I want to understand the lifetime of a pipe? http://linux.die.net/man/2/pipe Does the data in the pipe stay alive if either the sender or receiver dies/exits? Can the pipe be created if the receiver is not present? (i.e. has not been forked off…
tsar2512
  • 2,826
  • 3
  • 33
  • 61
2
votes
3 answers

Sending messages between two Python servers

I have two servers - one Django, the other likely to be written in Python - and one is putting 'tasks' into a database and another is processing these tasks. They share a database, but I want the processor to react quickly to new tasks rather than…
Will
  • 73,905
  • 40
  • 169
  • 246
2
votes
3 answers

Sending data from one program to another non-blocking in C

I'm looking for advice on the best, simplest IPC method for this scenario: Two programs on the same Linux server. Program 1 has a variable with an integer in it that is periodically updated to a different value, say every 1 second. Program 2 needs…
user3618656
  • 49
  • 1
  • 7
2
votes
1 answer

UDP Unicast Communication between three servers using java

I want to make three servers communicate using java UDP. If a particular method which exists for all the three servers is called on the first server instance the other two servers should also communicate the result for those methods to the first…
Aayush
  • 1,244
  • 5
  • 19
  • 48
2
votes
1 answer

Are shared memory segments compatible across boost versions and compiler versions

I'm maintaining an old project, and now it has to work with another project build with a newer version of visual studio and a newer version of boost. To communicate with other processes, the first project uses a shared memory segment, so now the…
Sambatyon
  • 3,316
  • 10
  • 48
  • 65
2
votes
0 answers

hadoop reduce > reduce

I'm running a Job on hadoop. examples worked fine. However, my job is stuck at map 100 % reduce 67 %. map reduce task status is "reduce > reduce". my reduce() method : public static class MyReducer extends Reducer
Ludovic S
  • 185
  • 1
  • 2
  • 9