Dedicated CPU core for Python?
Joshua J. Kugler
joshua at eeinternet.com
Fri Apr 27 15:14:29 EDT 2007
On Thursday 26 April 2007 14:07, Gabriel Genellina wrote:
> En Thu, 26 Apr 2007 15:54:38 -0300, Joshua J. Kugler
> <joshua at eeinternet.com> escribió:
>
>> Are you talking about CPU affinity
>> (http://en.wikipedia.org/wiki/Processor_affinity) or an actual CPU that
>> can directory execute Python byte code? If the former, CPython only
>> uses one
>> CPU core right now because it's threads are all internal, and do not
>> spawn system threads (IIRC).
>
> Python threads are OS threads:
> http://docs.python.org/lib/module-thread.html
> "[The thread module] is supported on Windows, Linux, SGI IRIX, Solaris
> 2.x, as well as on systems that have a POSIX thread (a.k.a. ``pthread'')
> implementation."
Yes, that may be, but they are not true system threads, or at least do not
appear to be. Threads on linux each show up as a separate process. I can
have several threads in my Python program, but no additional processes show
up in ps -A. I don't see how Python threads can be system threads with the
GIL. But, I've been wrong before, and threads are something I have very
light knowledge of.
j
--
Joshua Kugler
Lead System Admin -- Senior Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
--
Posted via a free Usenet account from http://www.teranews.com
More information about the Python-list
mailing list