ABA Prevention Using Single-Word Instructions

The ABA problem is a fundamental problem that affects almost all lock-free algorithms. The atomic primitives LL/SC/VL (Load-Linked,Store-Conditional,Validate) offer a convenient way for algorithm designers to reason about lock-free algorithms,without concern for the ABA problem. However,for practical architectural reasons,no processor architecture supports the ideal semantics of LL/VL/SC. It is relatively easy to implement LL/SC/VL—and prevent the ABA problem—using double-word atomic instructions. However,most current mainstream 64-bit architectures support only single-word atomic instructions. The best known constructions of LL/SC/VL using single-word instructions entail substantial space overhead when applied to a large number of memory locations,and require knowing the maximum number of threads in advance. This report presents simple lock-free constructions using only practical single-word instructions for implementing ideal LL/SC/VL, and hence preventing the ABA problem,with reasonable space overhead. These constructions can also be used to implement arbitrary width atomic operations.

By: Maged M. Michael

Published in: RC23089 in 2004

LIMITED DISTRIBUTION NOTICE:

This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.

rc23089.pdf

Questions about this service can be mailed to reports@us.ibm.com .