Asked By : Aida
Answered By : Illimitable
Consider the modern way of making cars – on an assembly line. Here, there is an orderly flow of parts down a conveyor belt, and the parts are processed by different stations (also called segments of the assembly line). Each segment does one thing, over and over. The segments are coordinated to exploit the sequentiality inherent in the automobile assembly process. The work gets done more smoothly (because of the orderly flow of input parts and output results), more efficiently (because each assembler at each segment of the pipeline does his or her task at what one hopes is maximum efficiency), and more reliably because there is greater consistency in one task being done repetitively (provided the assembly line is designed correctly).
To put it in a simple way: Suppose you build a car in 10 steps $(s_1, s_2, dots, s_{10})$. Suppose also that a single person can complete these 10 steps in 2 hours and a single step in 12 minutes. Let’s also say that you have only 1 workplace for each step, so 2 people can’t be working on the same step for 2 different cars. You’d have two ways to produce cars:
- Put a single person that builds a car every 2 hours and uses all 10 workplaces.
- Put a person per workplace (10 people in total) where each person completes a single step in 12 minutes and have a car every 12 minutes. The exception in this case is the first car which would take 2 hours to be completed, but from the second car and forward you’d have a car every 12 minutes.
The second way is the equivalent of pipelining.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/43207