Liveness properties, such as termination, of even the simplest shared-memory concurrent programs under sequential consistency typically require some fairness assumptions about the scheduler. Under weak memory models, we observe that the standard notions of thread fairness are insufficient, and an additional fairness property, which we call memory fairness, is needed. In this paper, we propose a uniform definition for memory fairness that can be integrated into any declarative memory model enforcing acyclicity of the union of the program order and the reads-from relation. For the well-known models, SC, x86-TSO, RA, and StrongCOH, that have equivalent operational and declarative presentations, we show that our declarative memory fairness condition is equivalent to an intuitive model-specific operational notion of memory fairness, which requires the memory system to fairly execute its internal propagation steps. Our fairness condition preserves the correctness of local transformations and the compilation scheme from RC11 to x86-TSO, and also enables the first formal proofs of termination of mutual exclusion lock implementations under declarative weak memory models.
翻译:生命属性,例如终止,甚至连简单、共享和模拟的连续一致的同步程序,通常要求对调度器作一些公平的假设。在脆弱的记忆模型中,我们观察到线条公平的标准概念不够充分,需要额外的公正属性,我们称之为记忆公正。在本文件中,我们提出了一个统一的记忆公正性定义,可以纳入任何执行程序命令的周期性以及读取关系的宣示性记忆模型。对于有同等操作性和宣示性演示的著名模型,SC、x86-TSO、RA和strongCOH,我们表明,我们的宣示性记忆公平性条件相当于一个直观的模范记忆公平性操作概念,要求记忆系统公平执行其内部传播步骤。我们的公平性条件维护了本地转换的正确性以及RC11至x86-TSO的汇编计划,还使得在宣示性弱的记忆模型下终止相互排斥锁定执行的第一个正式证据。