RE: Posix and System V IPC

ipcmessage-queueposixsemaphoreshared-memory

  1. Which IPC among message queues, shared memory and semaphores is easiest to convert to network IPC and which is the hardest.

  2. Would it be easier to convert System V shared memory to network IPC or Posix shared memory to network IPC

Best Answer

As Henrik Gustafsson said:

  1. Message queues are by far the easiest IPC mechanism to convert to network. Semaphores are not designed to convey data, and shared memory typically needs semaphore-controlled access (or an equivalent mechanism) to provide proper control even on a single machine, let alone across a network. That said, System V message queues are probably the least widely used IPC mechanism.

  2. The conversion of any shared memory mechanism is approximately equally hard. The key point to note is that in fact you seldom if ever use 'just shared memory'; there are other synchronizing tools in use too.