Concurrent disjoint set union
Autor: | Robert E. Tarjan, Siddhartha Jayanti |
---|---|
Rok vydání: | 2021 |
Předmět: |
010302 applied physics
Discrete mathematics Computer Networks and Communications Model of computation Double compare-and-swap Inverse 0102 computer and information sciences Disjoint sets Binary logarithm 01 natural sciences Theoretical Computer Science Randomized algorithm Compare-and-swap Computational Theory and Mathematics 010201 computation theory & mathematics Hardware and Architecture 0103 physical sciences Connectivity Mathematics |
Zdroj: | Distributed Computing. 34:413-436 |
ISSN: | 1432-0452 0178-2770 |
DOI: | 10.1007/s00446-020-00388-x |
Popis: | We develop and analyze concurrent algorithms for the disjoint set union (“union-find” ) problem in the shared memory, asynchronous multiprocessor model of computation, with CAS (compare and swap) or DCAS (double compare and swap) as the synchronization primitive. We give a deterministic bounded wait-free algorithm that uses DCAS and has a total work bound of $$O\biggl ( m \cdot \left( \log {\left( \frac{np}{m} + 1 \right) } + \alpha {\left( n, \frac{m}{np} \right) } \right) \biggr )$$ O ( m · log np m + 1 + α n , m np ) for a problem with n elements and m operations solved by p processes, where $$\alpha $$ α is a functional inverse of Ackermann’s function. We give two randomized algorithms that use only CAS and have the same work bound in expectation. The analysis of the second randomized algorithm is valid even if the scheduler is adversarial. Our DCAS and randomized algorithms take $$O(\log n)$$ O ( log n ) steps per operation, worst-case for the DCAS algorithm, high-probability for the randomized algorithms. Our work and step bounds grow only logarithmically with p, making our algorithms truly scalable. We prove that for a class of symmetric algorithms that includes ours, no better step or work bound is possible. Our work is theoretical, but Alistarh et al (In search of the fastest concurrent union-find algorithm, 2019), Dhulipala et al (A framework for static and incremental parallel graph connectivity algorithms, 2020) and Hong et al (Exploring the design space of static and incremental graph connectivity algorithms on gpus, 2020) have implemented some of our algorithms on CPUs and GPUs and experimented with them. On many realistic data sets, our algorithms run as fast or faster than all others. |
Databáze: | OpenAIRE |
Externí odkaz: |