Threading problem
Gustavo Cordova
gcordova at hebmex.com
Thu Apr 4 09:37:38 EST 2002
> >
> > This is evil :-(
>
> It's trade-offs. It may be less than desirable for multi-processor
> utilization, but it actually carries quite a few implementation
> benefits for the Python core, as well as minimizes the performance
> overhead for maintaining native threading support. In all but SMP
> cases, it works quite well (barring non-cooperative extensions).
>
So it's a necessary evil, but evil nontheless. :-(
>
> The only way to change this would be to push all the interlocking down
> to the individual data structure/object levels, which would be no
> small feat (at least for the current CPython implementation), but one
> which I believe gets discussed from time to time. Wouldn't hold my
> breathe though :-)
>
Yeah, sounds like what's been happening to the Linux kernel
in the last iterations; locking has become steadily finer-grained,
so that multiprocessor setups will scale better.
I also believe that Python, eventually, will have to follow
that same path.
*Eventually*
And yes, it'll be a lot of work.
And it will impact it's internal architecture heavily.
Salutations!
-gustavo
More information about the Python-list
mailing list