Previous | Next --- Slide 12 of 47
Back to Lecture Thumbnails
Berry

In practice should one be worried that the gap between the blue and yellow bar keeps growing? I interpret this as the result of yellow work being stored for extended periods of time which intuitively enlarges the memory footprint of this program. Is this true?

rbcarlso

@Berry: Notice that here the gap isn't actually growing. At most two yellow bars are ever stored at a time, it's just that it takes longer for a yellow bar to enter the picture when the buffer gets filled.

In general, though, it makes sense that if you pass jobs to a worker faster than the worker can do the jobs, either the worker's buffer will fill up and you'll have to pass jobs slower, or the worker's buffer will expand and potentially exhaust your memory. Bottlenecks are why we have buffers, but buffers aren't perfect.

Faust

I agree with @rbcariso here. This is how I think of this diagram. I'm not sure if my thinking is completely correct.

The buffer holds at most two messages. The white boxes will stop expanding after the 3rd blue box. We can see this because the reason that we have these dotted boxes is because our buffer is full. However, each blue box will clear one message. Thus, after each blue box, we can load another message. Thus, the gap between the blue and yellow bar will continue to be the same distance as the gap in the last line.