3 ms·
Not quite. Going back to the bottling example, a bottle has to be filled, capped, then labeled. At time 1, 1 bottle is filling up, pipeline is advanced. At t
by spc476 2y ago
Not quite. Going back to the bottling example, a bottle has to be filled, capped, then labeled. At time 1, 1 bottle is filling up, pipeline is advanced. At time 2, bottle 2 is filling up, bottle 1 is being capped, pipeline is advanced. At time 3, bottle 3 is filling up, bottle 2 is being capped, and bottle 1 is being labeled. At time 4, bottle 1 is done. Each bottle has to go through the pipeline in sequence, and it takes three units of time for a bottle to go through the pipeline. Yes, once the pipeline is filled up, you have the three operations going on at the same time, but it's still a sequence of steps that need to be performed in order for any given bottle.
To make it faster, you either have to decrease the time for a step (but you will always be capped with the slowest step), or go for parallelism---a separate pipeline (or pipelines). For example, with one pipeline, each step taking 1 unit of time, once the pipeline is filled, will take six units of time to make a six-pack (the first will take longer due to the latency in filling the pipeline). You can make five other pipelines, and then get a six-pack per unit of time (again, after filling all the pipelines).
A single pipeline just makes the output have a predictable latency and time; multiple pipelines give you parallelism.
- Joker_vD 2y ago> For example, with one pipeline, each step taking 1 unit of time, once the pipeline is filled, will take six units of time to make a six-pack Compared to 18 units of time needed to make a six-pack without pipelining. Gee, what a wondrous invention this "pipeline" is: having three workers means the work is accomplished thrice as fast, yet there is (according to you) no parallelism at all! So naturally, if we could introduce parallelism inside this single pipeline, we would be able to make another triple reduction in time, and get a production of six-pack take only 2 units of time.
- Jtsummers 2y ago> To make it faster, you either have to decrease the time for a step (but you will always be capped with the slowest step), or go for parallelism---a separate pipeline (or pipelines). > A single pipeline just makes the output have a predictable latency and time; multiple pipelines give you parallelism. No, the pipeline does give you parallelism because you're doing three (in the bottling example) pieces of work simultaneously, that is: in parallel. Filling, capping, labeling are each being done on different bottles at the same time. How is that not parallelism? Let's use some numbers: Filling, capping, labeling take 30s, 15s, 15s each (arbitrary, chosen for easy math). Without a pipeline you will process 60 bottles per hour (say one station that does all 3 tasks and then kicks out the bottle, let's ignore transition times). With a pipeline you can get 120 per hour. You've improved throughput. The latency per bottle is still 60s. BTW, you can double throughput again without even needing a full second pipeline just by adding a second filling station (with my example numbers) and feeding filled bottles to the same capping and labeling stages, getting you to 240 per hour.
- bee_rider 2y agoI think you are using an unconventional definition of the word parallelism, if you want to exclude > Yes, once the pipeline is filled up, you have the three operations going on at the same time, but it's still a sequence of steps that need to be performed in order for any given bottle. as not parallel. It seems to me that what you are calling parallelism, most people would instead call homogeneous parallelism. Which is a subset of parallelism.
- hinkley 2y agoIn modern bottling they fill a bunch of bottles at the same time, and in some cases (How It’s Made) the bottling or pastry pouring or cookie cutting equipment moves with the conveyor so it never has to stop. But that’s new equipment, so filling the bottle is still the slow step in some past version of the bottling plant. You’re still going to fill three, four, six bottles at a time, then cap them, but the labeling machine might just be serial. The way those machines work is also pipelined - add some space between the bottles, slap a label on, use rollers to make the label stick. Then you load the cases n bottles at a time, not via pick and pull. Several of those steps could feed in from one machine to four and back to two and then to one. More equipment means more maintenance but also affords you taking part of the system offline and still keeping output from cratering.
- yazzku 2y agoInstruction pipelining is literally a form of instruction-level parallelism. To argue it's not parallelism is a weird take. https://en.wikipedia.org/wiki/Instruction_pipelining https://en.wikipedia.org/wiki/Instruction_pipelining Your argument basically amounts to forming an arbitrary definition of "unit" that consists of the whole thing so that then you can state that there is no parallelism. By that token, an 8-core processor has no parallelism because it can only execute a single package of 8 threads at any given time.