As I was explaining multicore performance to a friend in my earlier blog post, I thought of using an analogy that makes this issue easier to understand. So here it is:
Suppose you are moving out of your house and you call a moving company to help. The moving company then sends a truck and couple of strong guys to do the heavy lifting. Let’s say it takes eight hours for this set of movers to pack all of the contents of your house into boxes and load the truck. The question is – if you were to call eight moving companies (cores), would they together be able to complete the move in one hour? The answer depends upon layout of your house (chip architecture), number of different rooms where work is needed (functional partitioning) and the number of different boxes, tape and other materials that movers have at their disposal to work with (data partitioning). All of these dimensions have an impact on how quickly the move gets completed. Let’s examine each one.
If the house is small with only one entrance door and narrow hallways, additional movers will just step on each other and slow down the overall progress. Providing wider spaces and more paths (chip architecture and interconnects) to the movers (cores) will reduce collisions and help the movers work more efficiently.
Even if the access inside the house is ideal, what would happen if all the contents in the house were stored in only one room? Again movers would be constrained in their movement and may have to wait on each other, wasting time. The farther apart the contents are kept (functional partitioning) with wide open access, the faster the job would get done.
With the above two factors taken care of, what would happen if the movers had to share tape or boxes or other resources needed to pack the contents? Again, the movers would have to wait for resources and therefore not be as efficient. The lesser the resource contention (data partitioning) between the movers, the faster the overall progress will be.
I am sure we can come up with other examples to explain multicore performance. We come across these tradeoffs in our daily lives and chores. The main thing is to understand these constraints and employ the right device for the application at hand. Therefore, if you are calling a moving company for a large office move, it would probably make sense to call many movers with several trucks, but a single truck and a few movers may be sufficient for a small house.
What about you? What other analogies can you think of to describe multicore performance?
For more posts by TI multicore experts, visit www.ti.com/multicoremix_ecn