3 ms·
Does anyone know any documentation on how UNIX achieves parallelism in pipelines, especially modern implementations? Is each stage of a piped command just anoth
by AtlasBarfed 4y ago
Does anyone know any documentation on how UNIX achieves parallelism in pipelines, especially modern implementations? Is each stage of a piped command just another spun off process?
- woodruffw 4y agoYes, it's just that: each process in the pipeline is spawned, and then blocks as it waits for input from the previous step in the pipeline. I think a better way to think about it is that the UNIX model requires parallelism: without parallelism, each stage in the pipeline would need to fully buffer its intermediate state before forwarding it to the next stage.
- superdisk 4y ago> without parallelism, each stage in the pipeline would need to fully buffer its intermediate state before forwarding it to the next stage. That's how DOS implemented the pipe syntax I believe.
- masklinn 4y ago> Is each stage of a piped command just another spun off process? Yes. With, as the name says, a pipe inbetween.