ABSTRACT
We devise a technique for augmenting shared objects in the standard n-process shared memory model with a linearizable Write{} operation, using bounded space and optimal worst-case step complexity. We provide a transformation of any shared object SW supporting only sequential Write{} operations into an object $W$ that supports concurrent Write{} operations. This transformation requires O(n2) SW objects and O(n2) O(log n)-bit registers, and each method (including Write{}) has, up to a constant additive term, the same time complexity as the corresponding method on object $SW$. Our implementation is deterministic, wait-free, and uses only shared registers (supporting atomic read and write operations). To the best of our knowledge, similarly efficient general constructions are not known even if stronger primitives such as CAS or LL/SC are available.
Applying our transformation, we obtain an implementation of a k-word register from O(n2⋅ k) single-word registers. As another application we can transform randomized one-time TAS objects (e.g., randomized wait-free implementations that use a bounded number of registers [8,9]), into long-lived ones using also a bounded number of registers. The transformation preserves the time complexity of TaS{} operations and allows resets in constant worst-case time.
Our transformation employs a novel memory reclamation technique, which can replace Hazard Pointers [20] and is more efficient.
- Y. Afek, E. Gafni, J. Tromp, and P. Vitányi. Wait-free test-and-set (extended abstract). In WDAG 6th, pages 85--94, 1992. Google ScholarDigital Library
- D. Alistarh and J. Aspnes. Sub-logarithmic test-and-set against a weak adversary. In DISC 25th, pages 97--109, 2011. Google ScholarDigital Library
- T. Brown, F. Ellen, and E. Ruppert. Pragmatic primitives for non-blocking data structures. In ODC 32th, pages 13--22, 2013. Google ScholarDigital Library
- T. Brown, F. Ellen, and E. Ruppert. A general technique for non-blocking trees. In Proc. of 19th PPoPP, pages 329--342, 2014. Google ScholarDigital Library
- D. Detlefs, P. Martin, M. Moir, and G. S. Jr. Lock-free reference counting.DistComp, 15(4):255--271, 2002. Google ScholarDigital Library
- F. Ellen, Y. Lev, V. Luchangco, and M. Moir. Snzi: scalable nonzero indicators. In ODC 26th, pages 13--22, 2007. Google ScholarDigital Library
- F. Ellen and P. Woelfel. An optimal implementation of fetch-and-increment. In DISC 27th, pages 284--298, 2013.Google ScholarDigital Library
- G. Giakkoupis, M. Helmi, L. Higham, and P. Woelfel. An $O(\sqrtn)$ space bound for obstruction-free leader election. In DISC 27th, pages 46--60, 2013.Google Scholar
- G. Giakkoupis and P. Woelfel. On the time and space complexity of randomized test-and-set. In ODC 31th, pages 19--28, 2012. Google ScholarDigital Library
- A. Gidenstam, M. Papatriantafilou, H. Sundell, and P. Tsigas. Efficient and reliable lock-free memory reclamation based on reference counting.TPDS, 20(8):1173--1187, 2009. Google ScholarDigital Library
- W. Golab. Constant-RMR Implementations of CAS and Other Synchronization Primitives Using Read and Write Operations. PhD thesis, University of Toronto, 2010. Google ScholarDigital Library
- W. Golab, V. Hadzilacos, D. Hendler, and P. Woelfel. RMR-efficient implementations of comparison primitives using read and write operations. Dist Comp, 25(2):109--162, 2012.Google ScholarCross Ref
- M. Herlihy. Impossibility and universality results for wait-free synchronization. In ODC 7th, pages 276--290, 1988. Google ScholarDigital Library
- M. Herlihy, V. Luchangco, and M. Moir. The repeat offender problem: A mechanism for supporting dynamic-sized, lock-free data structures. In DISC 16th, pages 339--353, 2002. Google ScholarDigital Library
- M. Herlihy and J. Wing. Linearizability: A correctness condition for concurrent objects.TOPLAS, 12(3), 1990. Google ScholarDigital Library
- A. Israeli and M. Li. Bounded time-stamps. In FOCS 28th, pages 371--382, 1987. Google ScholarDigital Library
- P. Jayanti. A complete and constant time wait-free implementation of CAS from LL/SC and vice versa. In DISC 12th, pages 216--230, 1998. Google ScholarDigital Library
- A. Larsson, A. Gidenstam, P. H. Ha, M. Papatriantafilou, and P. Tsigas. Multiword atomic read/write registers on multiprocessor systems. ACM Journal of Experimental Algorithmics, 13, 2008. Google ScholarDigital Library
- H. Lee. Fast local-spin abortable mutual exclusion with bounded space. In ØPODIS 14th, pages 364--379, 2010. Google ScholarDigital Library
- M. Michael. Hazard pointers: Safe memory reclamation for lock-free objects.TPDS, 15(6):491--504, 2004. Google ScholarDigital Library
- G. Peterson. Concurrent reading while writing.TOPLAS, 5(1):46--55, 1983. Google ScholarDigital Library
- H. Sundell. Wait-free reference counting and memory management. In IPDPS 19th, 2005. Google ScholarDigital Library
- J. Valois. Lock-free linked lists using compare-and-swap. In ODC 14th, pages 214--222, 1995. Google ScholarDigital Library
Index Terms
- Making objects writable
Recommendations
Brief announcement: resettable objects and efficient memory reclamation for concurrent algorithms
PODC '13: Proceedings of the 2013 ACM symposium on Principles of distributed computingWe present a new technique for reclaiming memory in concurrent shared memory algorithms with n asynchronous processes. Our methodology can be applied in the same settings as hazard pointers [10], but provides better worst-case guarantees: For the same ...
Tight Bounds for Adopt-Commit Objects
We give matching upper and lower bounds of $\varTheta(\min(\frac{\log m}{\log \log m},\, n))$ for the individual step complexity of a wait-free m -valued adopt-commit object implemented using multi-writer registers for n anonymous processes. While the upper bound is deterministic, the lower bound ...
Abortable and query-abortable objects and their efficient implementation
PODC '07: Proceedings of the twenty-sixth annual ACM symposium on Principles of distributed computingWe introduce abortable and query-abortable objects, intended for asynchronous shared-memory systems with low contention. These objects behave like ordinary objects when accessed sequentially, but may abort operations when accessed concurrently. An ...
Comments