Inter-process communication (IPC)
Inter-process communication is the method or API in which different processes can communicate with one another. There are four main methods to communicate messages between two processes.
- Message-passing IPC: This is via the OS which offers an API to pass messages between processes the OS puts them on a message bus that is sent to the other process. This has the advantage that it is managed by the OS and is safe - though it has the disadvantage of needing the OS which incurs a lot of overhead.
- Shared memory IPC: This lets two processes share some physical memory which is mapped into both their virtual memory space. This means the OS is out of the way but the two processes must know how to use that shared memory with one another - sometimes having to re-implement code in the OS.
- Higher level semantics: Such as shared files or Remote Procedure Calls (RPC).
- Synchronization: Methods in which two processes can synchronize so not to adversely effect one an others operation. Examples are mutexes or semaphores.