超越线程级锁集:多线程临界区与动态死锁预测
Beyond Per-Thread Lock Sets: Multi-Thread Critical Sections and Dynamic Deadlock Prediction
AI总结:
本文提出了一种改进的锁集构造方法,通过基于跟踪的临界区特征化,解决了多线程死锁预测中的假阳性与假阴性问题。
摘要:
锁集常用于死锁的动态分析。标准的线程级锁集构造只考虑同一线程获取的锁,但 unaware of 其他线程获取的锁。这导致了假阳性与假阴性。根本问题是常用的临界区概念,其锁集构造依赖的临界区忽略了其他线程的事件。我们给出基于跟踪的临界区特征化,从而摆脱了这一限制。临界区不再局限于单一线程,可以涵盖多个线程。这种形式的临界区存在,是自然的,并且修正了标准的公式化。我们展示了如何通过偏序关系来准确近似基于跟踪的特征化。因此,我们获得了一个改进的锁集构造,仍能高效计算,并允许我们去除 DIRK 死锁预测器报告的假阳性,并通过扩展 SPDOffline 死锁预测器来去除假阴性。我们将各种精度更高的锁集构造整合到 SPDOffline 的扩展中。我们的扩展保持了正确性(无假阳性),但比 SPDOffline 更完整(更少的假阴性)。对于广泛的标准化基准套件,我们也可以展示性能不受影响。
英文摘要:
Lock sets are commonly used for dynamic analysis of deadlocks. The standard per-thread lock set construction only considers locks acquired in the same thread, but is unaware of locks acquired in another thread. This leads to false positives and false negatives. The underlying issue is that the commonly used notion of a critical section on which the lock set construction relies ignores events from other threads. We give a trace-based characterization of critical sections that drops this restriction. Critical sections are no longer restricted to a single thread and can cover multiple threads. Such forms of critical sections exist, are natural, and correct the standard formulation. We show how to soundly approximate the trace-based characterization via partial order relations. Thus, we obtain an improved lock set construction that can still be efficiently computed and allows us to remove false positives reported by the DIRK deadlock predictor and remove false negatives by extending the SPDOffline deadlock predictor. We integrate various lock set constructions with increased precision in an extension of SPDOffline. Our extensions remain sound (no false positives) but are more complete (fewer false negatives) w.r.t. SPDOffline. For an extensive standard benchmark suite we can also show that the performance is not affected.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。