一句话:提出基于向量时钟的单遍线性时间算法 AeroDrome,在线检测冲突可串行化违反以实现原子性检查。
多线程程序的行为依赖于线程交错,开发者难以推理。原子性等非干扰性质可把执行等价为原子块串行执行的执行,从而缩减交错空间;冲突可串行化是动态检查原子性的经典判据。已有算法通过检测执行中事务依赖图里的环来发现违反,但图中边数可能随迹长度平方增长,导致分析不可扩展。本文提出 AeroDrome:一种基于向量时钟的单遍、线性时间、在线算法,用于检测冲突可串行化的违反。它避免构造平方规模的事务图,在事件流上以线性时间完成检查。实验表明,AeroDrome 可扩展到包含大量事件的迹,并取得显著加速。
Multi-threaded programs are challenging to write. Developers often need to reason about a prohibitively large number of thread interleavings to reason about the behavior of software. A non-interference property like atomicity can reduce this interleaving space by ensuring that any execution is equivalent to an execution where all atomic blocks are executed serially. We consider the well studied notion of conflict serializability for dynamically checking atomicity. Existing algorithms detect violations of conflict serializability by detecting cycles in a graph of transactions observed in a given execution. The number of edges in such a graph can grow quadratically with the length of the trace making the analysis not scalable. In this paper, we present AeroDrome, a novel single pass linear time algorithm that uses vector clocks to detect violations of conflict serializability in an online setting. Experiments show that AeroDrome scales to traces with a large number of events with significant speedup.