pipes - TarisMajor/5143-OpSystems GitHub Wiki
Pipes were introduced by Ken Thompson as part of the Unix operating system in the early 1970s. They were designed to facilitate data transfer between processes without the need for files, making the system more modular and efficient.
Uses
Pipes are often used in scenarios where data produced by one process must be consumed by another, such as:
Unix/Linux Command Line: In shell commands like ps | grep or cat file | sort, pipes allow different commands to pass data between them. Producer-Consumer: One process (the producer) generates data, and the other (the consumer) reads it via a pipe.
Examples
A command pipeline in Unix/Linux where the output of one program is passed directly into the input of another. A process in a web server writing logs to a pipe, which another process consumes for analysis.
Types
Anonymous Pipes: Used for communication between related processes (e.g., parent-child). Named Pipes (FIFOs): Can be used for communication between unrelated processes, even if they are not parent-child.