Agustina Arzille, on Sun 28 Feb 2016 18:52:26 -0300, wrote:
> programs (At least, I hope it isn't), but I think it serves to illustrate
> the performance of each implementation under heavy contention.

I don't think there is heavy contention actually :)

Since it's uni-processor, switches between threads happen only at timer
tick. I guess the difference is mostly from not using spinlocks: when by
lack of luck a thread is preempted while it holds the spinlock, the
other thread will spin until getting preempted. The spin lock loop
depresses priority to try to yield to another thread, but at some point
all threads have the same very-low priority, and thus no yield actually
happens.

So the big performance difference is probably not in the implementation,
but the global strategy. That's still very good news for overall
performance :)

Samuel

Reply via email to