threading and multicores, pros and cons

Paul Rubin http
Thu Feb 15 00:59:27 EST 2007


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.



More information about the Python-list mailing list