Lock-Free Dynamically Resizable Arrays
نویسندگان
چکیده
We present a first lock-free design and implementation of a dynamically resizable array (vector). The most extensively used container in the C++ Standard Template Library (STL) is vector, offering a combination of dynamic memory management and constant-time random access. Our approach is based on a single 32-bit word atomic compare-and-swap (CAS) instruction. It provides a linearizable and highly parallelizable STL-like interface, lock-free memory allocation and management, and fast execution. Our current implementation is designed to be most efficient on multi-core architectures. Experiments on a dual-core Intel processor with shared L2 cache indicate that our lock-free vector outperforms its lock-based STL counterpart and the latest concurrent vector implementation provided by Intel by a large factor. The performance evaluation on a quad dual-core AMD system with non-shared L2 cache demonstrated timing results comparable to the best available lockbased techniques. The presented design implements the most common STL vector’s interfaces, namely random access read and write, tail insertion and deletion, pre-allocation of memory, and query of the container’s size. Using the current implementation, a user has to avoid one particular ABA problem.
منابع مشابه
Dynamically Resizable Static CMOS Logic for Fine-Grain Leakage Reduction
Digital circuits often have a critical path that runs through a small subset of the component subblocks, but where the path changes dynamically during operation. Dynamically resizable static CMOS (DRCMOS) logic is proposed as a fine-grain leakage reduction technique that dynamically downsizes transistors in inactive subblocks while maintaining speed in subblocks along the current critical path....
متن کاملSplit-Ordered Lists - Lock-free Resizable Hash Tables
We present the first lock-free implementation of an extensible hash table running on current architectures. Our algorithm provides concurrent insert, delete, and search operations with an expected O(1) cost. It consists of very simple code, easily implementable using only load, store, and compare-and-swap operations. The new mathematical structure at the core of our algorithm is recursive split...
متن کاملPractical Non-blocking Unordered Lists
This paper introduces new lock-free and wait-free unordered linked list algorithms. The composition of these algorithms according to the fast-pathslow-path methodology, a recently devised approach to creating fast wait-free data structures, is nontrivial, suggesting limitations to the applicability of the fast-path-slow-path methodology. The list algorithms introduced in this paper are shown to...
متن کاملDynamically Resizable Instruction Cache: An Energy-Efficient and High-Performance Deep-Submicron Instruction Cache
.................................................................................................................. v
متن کاملDynamics of phaseulocked semiconductor laser arrays
Time-dependent coupled mode theory is used to investigate the stability of phase-locked semiconductor laser arrays. The output of individual array elements is dynamically unstable and exhibits large amplitude chaotic pulsations. The total output initially exhibits damped relaxation oscillations and then settles down. to a quasi-steady state characterized by small amplitude fluctuations. The the...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006