Re: Parallelization on muli-CPU hardware?

From: Alan Kennedy (alanmk_at_hotmail.com)
Date: 10/05/04


Date: Tue, 05 Oct 2004 15:38:51 +0100


[Sam G.]
> According to the fact that all Thread run on the same CPU (if i didn't
> understand wrong), i'm asking if python will suffer from the future
> multicore CPU. Will not python use only one core, then a half or a
> quarter of CPU ? It could be a serious problem for the future of
python...

I agree that it could potentially be a serious hindrance for cpython if
"multiple core" CPUs become commonplace. This is in contrast to jython
and ironpython, both of which support multiple-cpu parallelism.

Although I completely accept the usual arguments offered in defense of
the GIL, i.e. that it isn't a problem in the great majority of use
cases, I think that position will become more difficult to defend as
desktop CPUs sprout more and more execution pipelines.

I think that this also fits in with AM Kuchling's recent
musing/thesis/prediction that the existing cpython VM may no longer be
in use in 5 years, and that it may be superceded by python
"interpreters" running on top of other VMs, namely the JVM, the CLR,
Smalltalk VM, Parrot, etc, etc, etc.

http://www.amk.ca/diary/archives/cat_python.html#003382

I too agree with Andrew's basic position: the Python language needs a
period of library consolidation. There is so much duplication of
functionality out there, with the situation only getting worse as people
re-invent the wheel yet again using newer features such generators,
gen-exps and decorators.

Just my €0,02.

-- 
alan kennedy
------------------------------------------------------
email alan:              http://xhaus.com/contact/alan


Relevant Pages

  • Re: threads and sleep?
    ... Python is an incredibly bad choice for deeply ... no matter how many CPUs you have, only one will run python code ... If the GIL isn't an issue, ... thread support. ...
    (comp.lang.python)
  • Re: Summary of threading for experienced non-Python programmers?
    ... Whereas Python has special lock ... You can't use threads for that in CPython, due to the GIL (global ... Python programs cannot utilize multiple CPUs or multi-core CPUs. ... Python file and socket objects are extension modules that release ...
    (comp.lang.python)
  • Re: Help me use my Dual Core CPU!
    ... the cpus". ... I haven't looked at Occam. ... Is suppose Alice isn't related to the "Alice Machine" which was a tagged pool processor of some kind. ... dynamically typed like Python. ...
    (comp.lang.python)
  • multi-CPU, GIL, threading on linux
    ... (so python is not simulating threads by himself). ... all CPUs but one which are dispatching any given> Zope process will have to then wait and attempt to acquire the GIL; ...
    (comp.lang.python)
  • Re: multithreading concept
    ... for utilizing the power of multiple CPUs, ... Of course, that's not something you use Python for, at least not ... It's also the direction games are going. ... CPUs per chip reasonably soon. ...
    (comp.lang.python)