compare-and-swap
Why does Compare-And-Swap use Memory and Register
Why does the atomic swap instruction, which can be used to implement spin locks exchange data between a register and a memory location rather th开发者_运维问答an swapping two registers’ contents?The[详细]
2023-04-05 06:55 分类:问答How to understand this CCAS locking machanizion used in AKKA?
I just came across a piece of code in akka. https://codereview.scala-lang.org/fisheye/browse/~raw,r=25521/scala-svn/scala/trunk/test/files/presentation/akka/src/akka/util/LockUtil.scala[详细]
2023-04-03 06:56 分类:问答compare-and-swap atomic operation vs Load-link/store-conditional operation
Under an x86 processor I am not sure of the difference between compare-and-swap atomic operation and Load-link/store-condition开发者_开发知识库al operation. Is the latter safer than the former? Is it[详细]
2023-03-28 19:32 分类:问答Compare and Swap (CAS) implementation in EhCache
I am trying to find an equiva开发者_开发百科lent of MemCache\'s CASMutator.cas in EhCache.Essentially, I am swapping out EhCache for MemCache and need to implement an interface that calls for setting[详细]
2023-02-11 06:53 分类:问答Need help in understanding the "ABA" problem
I read one article, describing the ABA problem, but there is something, that I can\'t understand. I have source code, which fai开发者_如何学Pythonls to work and it is similar to the example in article[详细]
2023-01-29 10:27 分类:问答Compare and swap C++0x
From the C++0x proposal on C++ Atomic Types and Operations: 29.1 Order and Consistency [atomics.order][详细]
2023-01-25 12:34 分类:问答Compare and swap in machine code in C
How would you write a function in C which does an atomic compare and swap on an integer value, using embedded machine code (assuming, say, x86 architecture)? 开发者_如何学JAVACan it be any more specif[详细]
2023-01-25 12:25 分类:问答In Java what is the performance of AtomicInteger compareAndSet() versus synchronized keyword?
I was implementing a FIFO queue of requests instances (preallocated request objects for speed) and started with using the \"synchronized\" keyword on the add method.The method was quite short (check i[详细]
2023-01-12 16:58 分类:问答atomic swap with CAS (using gcc sync builtins)
Can the compare-and-swap function be used to swap variables atomically? I\'m using C/C++ via gcc on x86_64 RedHat Linux, specifically the __sync builtins.[详细]
2023-01-02 02:00 分类:问答Is OSCompareAndSwap immune to ABA problem like CMPXCHG8B?
Is O开发者_JAVA百科SCompareAndSwap is immune to ABA problem like CMPXCHG8B?It all depends on the implementation. OSCompareAndSwap* is only an interface which guarantee an atomic CAS operator (if the C[详细]
2022-12-24 00:34 分类:问答