Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thanks for comment. I do understand that practically it won't be feasible. But if we see it mathematically (k + n - 1)*tp increasing number of stages increase the total time by large amount. But if you try to manually calculate time taken by both the case will be same (max_delay * number_of_instruction). But with (k + n - 1)*tp we will get extremely different answer. This is what I am unable to understand. You are right practically it is difficult do it but still I want to think this question in ideal way first.
thanks for comment, you are right about delay won't change. I got one more doubt. Why is total time changing with stage. Say we got 100 stages 99 with 0 delay and 1 with 160 delay. And other with 5 stage 4 with 0 delay and 1 with 160 delay. As per the formula why is one with 100 stage taking more total time even though both of them are similar.
@RinkeshP I do understand pipe-lining a little. My question here is the equation does not satisfy maths. The equation "tp*(n-1) + (sum of delays in all stages)" would be satisfying math in most of cases right? But why we are using this equation "(k+n-1)*tp" ? Why there is k in that equation? If you remove k then my equation would be similar to this one.
Thanks for the answer, I do understand why we are taking (k-1)*tp. But I do not understand why we need n*tp. "n" is number of stages but all stages have different time so it does not make sense to me. Say all stage have 0 delay except one having delay of 160 as given. Then we will be getting same answer even my system is better than the other.
@RinkeshP Thanks for your comment. I searched around a little and got "The sequence number is a counter used to keep track of every byte sent outward by a host. If a TCP packet contains 1400 bytes of data, then the sequence number will be increased by 1400 after the packet is transmitted."