[TriLUG] Questions about Threading

John Franklin franklin at elfie.org
Tue Mar 26 15:03:16 EST 2002


On Tue, Mar 26, 2002 at 02:46:35PM -0500, John F Davis wrote:
> they are not as fast as linux threads, however the extra spin locks
> become insignificant when scaled across multiple cpu's.  This makes sense

I think you mean the spin locks become significant when scaled across
mutiple cpus.  The point of a spin lock, IIRC, is to busy-wait for a
short-short-short period of time with the expectation that the other
process on another CPU that has the lock will let go of it soon.  As
you increase the number of CPUs (and assuming the load is high enough to
make them all active), the odds of another CPU holding the lock
increases.  This is partly why a 2 CPU system tops out at between 1.5x
and 1.8x speed.  The other major reasons having to do with MMU and
on-chip cache invaldiation.

jf
-- 
John Franklin
franklin at elfie.org
ICBM: N37 12'54", W80 27'14" Z+2100'



More information about the TriLUG mailing list