dual processor

Alan Kennedy alanmk at hotmail.com
Mon Sep 5 07:01:39 EDT 2005


[Jeremy Jones]
>> One Python process will only saturate one CPU (at a time) because
>> of the GIL (global interpreter lock).

[Nick Craig-Wood]
> I'm hoping python won't always be like this.

Me too.

> However its crystal clear now the future is SMP.

Definitely.

> So, I believe Python has got to address the GIL, and soon.

I agree.

I note that PyPy currently also has a GIL, although it should hopefully 
go away in the future.

"""
Armin and Richard started to change genc so that it can handle the
new external objects that Armin had to introduce to implement
threading in PyPy. For now we have a simple GIL but it is not
really deeply implanted in the interpreter so we should be able to
change that later. After two days of hacking the were finished.
Despite that it is still not possible to translate PyPy with
threading because we are missing dictionaries with int keys on the
RPython level.
"""

http://codespeak.net/pipermail/pypy-dev/2005q3/002287.html

The more I read about such global interpreter locks, the more I think 
that the difficulty in getting rid of them lies in implementing portable 
and reliable garbage collection.

Read this thread to see what Matz has to say about threading in Ruby.

http://groups.google.com/group/comp.lang.ruby/msg/dcf5ca374e6c5da8

One of these years I'm going to have to set aside a month or two to go 
through and understand the cpython interpreter code, so that I have a 
first-hand understanding of the issues.

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



More information about the Python-list mailing list