arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2312.16977cs.PL
收藏

可证明公平的协作调度

Provably Fair Cooperative Scheduling

Reiner Hähnle, Ludovic Henrio

AI总结:

本研究针对协作调度语言,提出静止公平性概念,并基于SOS和LAGC语义设计可证明公平的调度器,为公平调度器实现提供形式化基础。

摘要:

本工作的背景是协作调度,一种并发范式,其中任务执行不会被任意抢占。相反,存在语言构造,允许任务自愿将执行权让给另一个任务。研究问题是设计可证明公平的调度器以及适合协作调度语言的公平性概念。据我们所知,这个问题迄今尚未被解决。我们的方法是从语义角度独立于语法构造或环境来研究公平性,即我们使用程序执行的正式定义来考虑公平性标准。我们为经典的结构操作语义(SOS)以及最近的局部抽象、全局具体(LAGC)语义开发了我们的概念。后者是一种高度模块化的语义方法,确保局部语句评估和调度决策之间的关注点分离。我们工作贡献的新知识有三个方面:首先,我们表明需要一种新的公平性概念,称为静止公平性,以充分刻画协作调度背景下的公平性;其次,我们为协作调度语言定义了一个可证明公平的调度器;第三,SOS和LAGC版本之间的定性比较表明,后者虽然初始工作量较大,但更易于证明公平性,并且在语言扩展下比SOS扩展得更好。我们工作的基础是对于在LAGC语义中定义的调度器的静止公平性的详细形式化证明。我们工作的重要性在于它为协作调度语言(一种日益流行的范式,例如:akka/Scala、JavaScript、异步Rust)的公平调度器实现提供了形式化基础。由于仅基于语义,我们的思想具有广泛的适用性。此外,我们的工作明确表明,并发语言中的标准公平性概念需要为协作调度以及更一般地,为任何将原子执行序列与某种形式的抢占相结合的语言进行调整。

英文摘要:

The context of this work is cooperative scheduling, a concurrency paradigm, where task execution is not arbitrarily preempted. Instead, language constructs exist that let a task voluntarily yield the right to execute to another task. The inquiry is the design of provably fair schedulers and suitable notions of fairness for cooperative scheduling languages. To the best of our knowledge, this problem has not been addressed so far. Our approach is to study fairness independently from syntactic constructs or environments, purely from the point of view of the semantics of programming languages, i.e., we consider fairness criteria using the formal definition of a program execution. We develop our concepts for classic structural operational semantics (SOS) as well as for the recent locally abstract, globally concrete (LAGC) semantics. The latter is a highly modular approach to semantics ensuring the separation of concerns between local statement evaluation and scheduling decisions. The new knowledge contributed by our work is threefold: first, we show that a new fairness notion, called quiescent fairness, is needed to characterize fairness adequately in the context of cooperative scheduling; second, we define a provably fair scheduler for cooperative scheduling languages; third, a qualitative comparison between the SOS and LAGC versions yields that the latter, while taking higher initial effort, is more amenable to proving fairness and scales better under language extensions than SOS. The grounding of our work is a detailed formal proof of quiescent fairness for the scheduler defined in LAGC semantics. The importance of our work is that it provides a formal foundation for the implementation of fair schedulers for cooperative scheduling languages, an increasingly popular paradigm (for example: akka/Scala, JavaScript, async Rust). Being based solely on semantics, our ideas are widely applicable. Further, our work makes clear that the standard notion of fairness in concurrent languages needs to be adapted for cooperative scheduling and, more generally, for any language that combines atomic execution sequences with some form of preemption.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑