In theory, a multithreaded application is supposed to spread the load evenly, in reality it's a bit more chaotic and nothing really runs in any specific order or completes in any order or uses resources in the way the "theoretical model" would predict they would, it's almost like each thread will fight for resources even causing contention and sometimes even starving other threads.
That's a funny picture and a good depiction of the theory vs the practice. I wonder what the artist will come up with adding a few CPU cores or even throwing in a few clusters !
Let's say each dog can only eat once the dog next to it wags its tail and another dog observed it and let there be more dogs than bowls, then we're getting into something like the dining philosophers problem, hehe :-D
What he says! :) Add a global interpreter lock into the mix (something like "only one dog can wag it's tail at a time) and you're all setup for perfect chaos and havoc :) I especially like the 1 dog missing - just like in a real multithreaded life!
Jan Vladimir Mostert
Idea Incubator
In theory, a multithreaded application is supposed to spread the load evenly, in reality it's a bit more chaotic and nothing really runs in any specific order or completes in any order or uses resources in the way the "theoretical model" would predict they would, it's almost like each thread will fight for resources even causing contention and sometimes even starving other threads.
Cool pic :-)