[Tutor] Python on multicore machines

OkaMthembo zebra05 at gmail.com
Fri Nov 27 14:57:23 CET 2009


Thanks, i must admit the concept of the GIL is cloudy to me - for example,
if the python interpreter on a single machine is
handling one process and locks until it is done, then on to the next one,
and so on - isn't that what causes speed issues?
I was wondering why python can't implicitly handle multiple processes at
once by using all machine cores (have many threads, each
invoking the interpreter and handling a process).

Maybe i should get up to speed on threads first to get the bigger picture?


On Fri, Nov 27, 2009 at 3:38 PM, Kent Johnson <kent37 at tds.net> wrote:

> On Fri, Nov 27, 2009 at 4:57 AM, OkaMthembo <zebra05 at gmail.com> wrote:
> > Hi All,
> >
> > Is there a python implementation that takes advantage of all cores on
> modern
> > multicore machines?
>
> Presumably you mean something like, "Is there a python implementation
> that can run multiple compute-bound processes on multiple cores
> concurrently."
>
> Some options:
> - the multiprocessing module in the std lib - here is an example of
> using it with numpy:
> http://folk.uio.no/sturlamo/python/multiprocessing-tutorial.pdf
>
> - Jython and IronPython both have threading models that allow multiple
> threads to run concurrently on multiple processors.
>
> Kent
>



-- 
Regards,
Lloyd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091127/5dd3da95/attachment-0001.htm>


More information about the Tutor mailing list