In the case of most IPC (InterProcess Communication) mechanisms, the general answer to your question is this: process A calls the kernel, passing a pointer to a buffer with data to be transferred to process B, process B calls the kernel (or is already blocked when the kernel is called) by passing a pointer to a buffer that should be filled with data from process A.
This general description applies to sockets , pipe , System V message queues , regular files, etc. As you can see, the cost of communication is high since it includes at least one context switch.
Signals constitute an IPC asynchronous mechanism in which one process can send a simple notification to another process that starts the handler registered by the second process (alternatively, doing nothing, stopping or killing this process if the handler is not registered, depending on the signal).
To transfer a large amount of data, you can use the shared memory V of system V, in which case two processes can access the same part of the main memory. Note that even in this case, you must use a synchronization mechanism, such as System V semaphores , which also leads to context switching.
This is why when processes need to be connected frequently, it is better to make them threads in one process.
source share