[Stackless] stackless and multi-core

Andrew Francis andrewfr_ice at yahoo.com
Mon Apr 28 16:31:07 CEST 2008


Hi Justin:

>Python doesn't do well with multiple cores due to a
>global lock on interpreter. You won't see much of a
>benefit distributing tasklets to multiple real
threads >because of this. There's a thread from last
month that >discusses doing this with multiple
processes instead.

I saw the Carlos post - pretty cool.

I don't know much about multiple CPU programming and
don't understand all the issues surrounding the GIL.
However from my understanding, from a behavioral
standpoint, the GIL acts on a principle similar to the
the watchdog in the Stackless scheduler. Again, how to
exploit this?

One thing I am curious about is what happens when you
run multiple CPUs but you still keep the GIL. However
you replace thread locks with simple user space spin
locks? The idea being to avoid the expensive OS
context switch.  What sort of performance gain will
you get? Can this be done cheaply?

Cheers,
Andrew




      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ




More information about the Stackless mailing list