Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 20

Diffs of xchg and cmpxchg to impl. lock

$
0
0
Inglese

I've read the artical Implementing Scalable Atomic Locks for Multi-Core Intel EM64T and IA32 Architectures at http://www3.intel.com/cd/ids/developer/asmo-na/eng/dc/threading/333935.htm
.
It says that the cmpxchg is just as expensive as the xchg instruction. Some test data were shown, but no reason was given.

Can anybody explain why those 2 instructions have the same cost to implement lock? Does this cost equivalency only exist for some certain scenarios?


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>