Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?
Daniel Dittmar
daniel.dittmar at sap.com
Fri Nov 3 10:16:47 EST 2006
robert wrote:
> ---- Question Besides: do concurrent INC/DEC machine OP-commands
> execute atomically on Multi-Cores as they do in Single-Core threads?
No on the level that that Python reference counting is implemented. The
CPUs have often special assembler ops for these operations. I think that
it's even more complicated as some machines require additional read and
write barriers around these operations.
>> Take a look at IPython1 and it's parallel computing capabilities [1,
[...]
> I do selected things with interprocess shared memory techniques already.
> Thats medium efficent.
> Multiple interpreters inside one process seem to be most promising for
> seemless multi-core programming.
Both IPython and Jython use multiple CPUs without the GIL, so you don't
need to add the complication of multiple interpreters.
> As all Python objects share the same
> malloc space - thats the key requirement in order to get the main
> effect. As soon as with have object pickling in between its well away
> from this very discussion.
There's the complication that CPython has garbage collection in addition
to reference counting. I'm not sure what happens when the garbage
collector looks at objects rooted in another interpreter.
Daniel
More information about the Python-list
mailing list