I am investigating how many times a copy happens in an IPC request. This helps me decide the best solution for my mobile device.
For example, shared memory is zero-copy, since processes can directly exchange messages.
Most IPC methods used on Linux (e.g., socket) need two copies: user->kernel->user.
The Binder in Android needs only one copy: from the user (sender) to the kernel space. Then it will utilize mmap()
to avoid a second copy.
As far as I know, the IPC connection in ZeroMQ is based on the UNIX domain socket. So does this mean the copy is unavoidable? If so, how many copies are needed?