Provably Fair Cooperative Scheduling

Reiner Hahnle, Ludovic Henrio
{"title":"Provably Fair Cooperative Scheduling","authors":"Reiner Hahnle, Ludovic Henrio","doi":"10.22152/programming-journal.org/2024/8/6","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":142220,"journal":{"name":"The Art, Science, and Engineering of Programming","volume":"25 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-10-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"The Art, Science, and Engineering of Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.22152/programming-journal.org/2024/8/6","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
可证明的公平合作调度
这项工作的背景是合作调度,这是一种并发范例,在这种范例中,任务的执行不会被任意抢占。相反,有一种语言结构可以让一个任务自愿将执行权让给另一个任务。研究的重点是为合作调度语言设计可证明的公平调度器和合适的公平概念。据我们所知,这个问题至今尚未解决。我们的方法是独立于语法结构或环境,纯粹从编程语言语义的角度来研究公平性,也就是说,我们使用程序执行的形式定义来考虑公平性标准。我们为经典的结构运算语义(SOS)和最新的局部抽象、全局具体(LAGC)语义开发了我们的概念。后者是一种高度模块化的语义方法,可确保本地语句评估与调度决策之间的分离。我们的工作贡献了三方面的新知识:首先,我们证明了需要一种新的公平性概念(称为静态公平性)来充分表征合作调度背景下的公平性;其次,我们为合作调度语言定义了一种可证明的公平调度器;第三,通过对 SOS 和 LAGC 版本进行定性比较,我们发现后者虽然需要更多的初始努力,但比 SOS 更易于证明公平性,并且在语言扩展时扩展性更好。我们工作的基础是对 LAGC 语义中定义的调度器的静态公平性进行详细的形式证明。我们工作的重要性在于,它为合作调度语言公平调度器的实现提供了形式基础,而合作调度语言是一种日益流行的范式(例如:Akka/Scala、JavaScript、async Rust)。由于完全基于语义,我们的想法具有广泛的适用性。此外,我们的工作清楚地表明,并发语言中的标准公平概念需要针对合作调度进行调整,更广泛地说,需要针对任何将原子执行序列与某种形式的抢占相结合的语言进行调整。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
CiteScore
1.70
自引率
0.00%
发文量
0
期刊最新文献
Provably Fair Cooperative Scheduling Live Objects All The Way Down: Removing the Barriers between Applications and Virtual Machines Conceptual Mutation Testing for Student Programming Misconceptions The Art, Science, and Engineering of Programming
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1