Whenever I’m asked how to figure out the maximum number of messages that will queue up in a message queue, I answer, “Oh, that’s just queuing theory”. And invariably I’ll hear an uncomfortable nervous sort of laughter. People are thinking “Sure! I’m gonna stop my project for a semester so I can take a course in queuing theory just to figure out how long to make my program’s message queue. What’s this guy been smoking?”

Similar questions come up about the capacity of linked lists and ring buffers, or the number of buffers in a buffer pool, or even the assignment of dual-port RAM to buffer descriptors inside of PowerQUICC communications processors. These questions impact directly the amount of memory that must be allocated to the resource at issue, and the capacity of an embedded system to handle the varying ebb and flow of data.