threading and multicores, pros and cons
John Nagle
nagle at animats.com
Thu Feb 15 01:19:55 EST 2007
Paul Rubin wrote:
> John Nagle <nagle at animats.com> writes:
>
>> If locking is expensive on x86, it's implemented wrong.
>>It's done right in QNX, with inline code for the non-blocking case.
>
>
> Acquiring the lock still takes an expensive instruction, LOCK XCHG or
> whatever. I think QNX is usually run on embedded cpu's with less
> extensive caching as these multicore x86's, so the lock prefix may be
> less expensive in the QNX systems.
That's not so bad. See
http://lists.freebsd.org/pipermail/freebsd-current/2004-August/033462.html
But there are dumb thread implementations that make
a system call for every lock.
John Nagle
More information about the Python-list
mailing list