IPC (Inter-Process Communication)
In concurrent programming, multiple processes or threads (we simply gonna say those two be tasks) often need to communicate to coordinate works, share data, or manage resources. This communication is known as Inter-Process Communication (IPC). Even when tasks do not explicitly exchange messages, they might still interact implicitly by competing for shared resources.
Technically, IPC seems that it only refers to communication between the processes, but it is not. We could also apply this techniques in terms of between threads.
Table of contents
Types of IPC
IPC mechanisms can be broadly classified into two categories:
Message-Passing IPC – Tasks communicate by sending and receiving messages. This method provides more isolation but may involve more overhead compared to shared memory.
Shared-Memory IPC – Tasks share a common memory space to exchange data. (This approach requires synchronization techniques to prevent race conditions.)