We could achieve perfect optimization if we could somehow have every student start walking once the previous student starts having their question answered. This would be the best way to pipeline threads, by keeping them busy doing other work until they are needed by this program.
CSGuy
This example illustrates that even with a fixed throughput (which is 1 student per 10 minutes here) an individual operation can time an arbitrarily long time
RamenSandwich
@ggm8 I would argue that calling that a "perfect optimization" is too broad a statement here. Each student would indeed be waiting in line for a shorter period of time, and Kayvon would achieve full utilization since he would be constantly answering questions. However, students are a special case of work: They don't want to schedule their lives around when they can ask questions and how does one fairly schedule in which order students show up? To put this into other words, how good would a user think a website is if they can only access it at a specific time of day, even if it achieves lower latency?
We could achieve perfect optimization if we could somehow have every student start walking once the previous student starts having their question answered. This would be the best way to pipeline threads, by keeping them busy doing other work until they are needed by this program.
This example illustrates that even with a fixed throughput (which is 1 student per 10 minutes here) an individual operation can time an arbitrarily long time
@ggm8 I would argue that calling that a "perfect optimization" is too broad a statement here. Each student would indeed be waiting in line for a shorter period of time, and Kayvon would achieve full utilization since he would be constantly answering questions. However, students are a special case of work: They don't want to schedule their lives around when they can ask questions and how does one fairly schedule in which order students show up? To put this into other words, how good would a user think a website is if they can only access it at a specific time of day, even if it achieves lower latency?