inter-process communication
The ways separate running programs pass data to each other, such as pipes, sockets, shared memory and signals.
In more detail
Each process has its own memory, so one program cannot simply read another program variables. The operating system provides channels instead: a pipe carries a stream of bytes, a socket carries messages between programs on one machine or across a network, and shared memory lets two processes read the same area. Containers can limit which of these channels they share.
Examples
A shell pipe such as ps | grep python passes the output of one process to another.In Node.js, fork() and cluster workers get an IPC channel automatically: send(value) on one side emits a message event on the other.Related terms
- IPC namespace — The namespace that separates the shared-memory areas and message queues processes use to talk to each other.
- process — A program that is currently running, with its own memory and a numeric identifier.
- Unix socket — A special file that two programs on the same machine use to talk to each other.
- IPC channel — A message pipe that lets two separate processes, such as a browser's renderer and its browser process, send each other data.
Taught in
- Namespaces And Cgroups: Isolation And Limits — Docker Architecture & Production Containers
- How Browsers Work: Navigation, DNS, TCP, TLS And Request Timing — Frontend Architecture & Web Platform
- Child Processes: spawn, execFile, fork & IPC — Node.js Internals & Backend Services
- Root, But Not That Root: Default Engine Security And Image Scanning — Docker Certified Associate (DCA) Exam Prep