We use cookies to improve your experience with our site.

一个面向多线程程序的高效并且灵活的确定性软件框架

An Efficient and Flexible Deterministic Framework for Multithreaded Programs

  • 摘要: 确定性对于多线程程序的调试、测试等方面非常有用.为了实现确定性,学术界提出了诸如确定性多线程和确定性回放等方法.然而,这些方法要么效率较低,要么只针对一种应用场景,导致不够灵活.本文针对多线程程序提出了一个高效且灵活的确定性框架.该框架分两步实现确定性:首先是放松确定性,然而是确定性.放松确定性通过设计一种合理的内存一致性来高效的解决数据竞争.在此基础上,我们以确定的顺序来解决同步竞争,从而最终实现强确定性.由于我们可以使用独立的算法来分别实现这两步,我们的框架可以提供一组不同程度的确定性策略,包括非确定性系统(最高效)、弱确定性系统(高效但不完全确定)、确定性多线程系统和确定性回放系统.实验显示当被配置成确定性多线程系统时,该框架的性能要由于目前经典的确定性算法.

     

    Abstract: Determinism is very useful to multithreaded programs in debugging, testing, etc. Many deterministic approaches have been proposed, such as deterministic multithreading (DMT) and deterministic replay. However, these systems either are inefficient or target a single purpose, which is not flexible. In this paper, we propose an efficient and flexible deterministic framework for multithreaded programs. Our framework implements determinism in two steps: relaxed determinism and strong determinism. Relaxed determinism solves data races efficiently by using a proper weak memory consistency model. After that, we implement strong determinism by solving lock contentions deterministically. Since we can apply different approaches for these two steps independently, our framework provides a spectrum of deterministic choices, including nondeterministic system (fast), weak deterministic system (fast and conditionally deterministic), DMT system, and deterministic replay system. Our evaluation shows that the DMT configuration of this framework could even outperform a state-of-the-art DMT system.

     

/

返回文章
返回