ABA防范与检测的空间复杂度研究
On the Time and Space Complexity of ABA Prevention and Detection
摘要:
我们调查的时间和空间复杂度的检测和防止ABA共享内存算法的系统与n个进程和有界的基础对象。为此,我们定义了ABA检测寄存器,它类似于普通的读/写寄存器,除了它们允许进程q用读操作检测自q的最后一次读取以来是否有进程写入寄存器。ABA检测寄存器可以实现平凡的从一个单一的无界寄存器,但我们表明,他们有很高的复杂性,如果基础对象是有界的:一个障碍的自由实现的ABA检测单比特寄存器不能实现从少于n-1有界寄存器。此外,有界CAS对象(或更一般地说,有条件的读-修改-写原语)提供很少的帮助,实现ABA检测单比特寄存器:我们证明了这样的实现线性时空权衡。我们表明,相同的时间-空间的权衡持有的实施单位LL/SC原语从有界可写CAS对象。这证明了Anderson和Moir(1995)以及Jayanti和Petrovic(2003)的LL/SC/VL实现是最优的。我们用严格的上界来补充我们的下界:我们给出了一个从n+1个有界寄存器中检测ABA寄存器的实现,其步长复杂度为O(1)。我们还表明,(有界)LL/SC/VL可以实现从一个单一的有界CAS对象和O(n)步的复杂性。这两个上界是渐近最优的时间-空间积。这些结果给出了正式的证据表明,ABA的问题本质上是困难的,即使是可写的CAS对象不提供显着的好处超过寄存器处理ABA的问题本身,并没有希望找到一个更有效的实现LL/SC/VL从有界CAS对象和寄存器比提到的。
英文摘要:
We investigate the time and space complexity of detecting and preventing ABAs in shared memory algorithms for systems with n processes and bounded base objects. To that end, we define ABA-detecting registers, which are similar to normal read/write registers, except that they allow a process q to detect with a read operation, whether some process wrote the register since q's last read. ABA-detecting registers can be implemented trivially from a single unbounded register, but we show that they have a high complexity if base objects are bounded: An obstruction-free implementation of an ABA-detecting single bit register cannot be implemented from fewer than n-1 bounded registers. Moreover, bounded CAS objects (or more generally, conditional read-modify-write primitives) offer little help to implement ABA-detecting single bit registers: We prove a linear time-space tradeoff for such implementations. We show that the same time-space tradeoff holds for implementations of single bit LL/SC primitives from bounded writable CAS objects. This proves that the implementations of LL/SC/VL by Anderson and Moir (1995) as well as Jayanti and Petrovic (2003) are optimal. We complement our lower bounds with tight upper bounds: We give an implementation of ABA-detecting registers from n+1 bounded registers, which has step complexity O(1). We also show that (bounded) LL/SC/VL can be implemented from a single bounded CAS object and with O(n) step complexity. Both upper bounds are asymptotically optimal with respect to their time-space product. These results give formal evidence that the ABA problem is inherently difficult, that even writable CAS objects do not provide significant benefits over registers for dealing with the ABA problem itself, and that there is no hope of finding a more efficient implementation of LL/SC/VL from bounded CAS objects and registers than the ones mentioned.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。