避免面包店算法中的寄存器溢出

A. Abdi, M. Sharifi
{"title":"避免面包店算法中的寄存器溢出","authors":"A. Abdi, M. Sharifi","doi":"10.1145/3409390.3409411","DOIUrl":null,"url":null,"abstract":"Computer systems are designed to make resources available to users and users may be interested in some resources more than others, therefore, a coordination scheme is required to satisfy the users’ requirements. This scheme may implement certain policies such as “never allocate more than X units of resource Z”. One policy that is of particular interest is the inability of users to access a single resource at the same time, which is called the problem of mutual exclusion. Resource management concerns the coordination and collaboration of users, and it is usually based on making a decision. In the case of mutual exclusion, that decision is about granting access to a resource. Therefore, mutual exclusion is useful for supporting resource access management. The first true solution to the mutual exclusion problem is known as the Bakery algorithm that does not rely on any lower-lever mutual exclusion. We examine the problem of register overflow in real-world implementations of the Bakery algorithm and present a variant algorithm named Bakery++ that prevents overflows from ever happening. Bakery++ avoids overflows without allowing a process to write into other processes’ memory and without using additional memory or complex arithmetic or redefining the operations and functions used in Bakery. Bakery++ is almost as simple as Bakery and it is straightforward to implement in real systems. With Bakery++, there is no reason to keep implementing Bakery in real computers because Bakery++ eliminates the probability of overflows and hence it is more practical than Bakery. Previous approaches to circumvent the problem of register overflow included introducing new variables or redefining the operations or functions used in the original Bakery algorithm, while Bakery++ avoids overflows by using simple conditional statements. The result is a new mutual exclusion algorithm that is guaranteed never to allow an overflow and it is simple, correct and easy to implement. Bakery++ has the same temporal and spatial complexities as the original Bakery. We have specified Bakery++ in PlusCal and we have used the TLC model checker to assert that Bakery++ maintains the mutual exclusion property and that it never allows an overflow.","PeriodicalId":350506,"journal":{"name":"Workshop Proceedings of the 49th International Conference on Parallel Processing","volume":"18 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Avoiding Register Overflow in the Bakery Algorithm\",\"authors\":\"A. Abdi, M. Sharifi\",\"doi\":\"10.1145/3409390.3409411\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Computer systems are designed to make resources available to users and users may be interested in some resources more than others, therefore, a coordination scheme is required to satisfy the users’ requirements. This scheme may implement certain policies such as “never allocate more than X units of resource Z”. One policy that is of particular interest is the inability of users to access a single resource at the same time, which is called the problem of mutual exclusion. Resource management concerns the coordination and collaboration of users, and it is usually based on making a decision. In the case of mutual exclusion, that decision is about granting access to a resource. Therefore, mutual exclusion is useful for supporting resource access management. The first true solution to the mutual exclusion problem is known as the Bakery algorithm that does not rely on any lower-lever mutual exclusion. We examine the problem of register overflow in real-world implementations of the Bakery algorithm and present a variant algorithm named Bakery++ that prevents overflows from ever happening. Bakery++ avoids overflows without allowing a process to write into other processes’ memory and without using additional memory or complex arithmetic or redefining the operations and functions used in Bakery. Bakery++ is almost as simple as Bakery and it is straightforward to implement in real systems. With Bakery++, there is no reason to keep implementing Bakery in real computers because Bakery++ eliminates the probability of overflows and hence it is more practical than Bakery. Previous approaches to circumvent the problem of register overflow included introducing new variables or redefining the operations or functions used in the original Bakery algorithm, while Bakery++ avoids overflows by using simple conditional statements. The result is a new mutual exclusion algorithm that is guaranteed never to allow an overflow and it is simple, correct and easy to implement. Bakery++ has the same temporal and spatial complexities as the original Bakery. We have specified Bakery++ in PlusCal and we have used the TLC model checker to assert that Bakery++ maintains the mutual exclusion property and that it never allows an overflow.\",\"PeriodicalId\":350506,\"journal\":{\"name\":\"Workshop Proceedings of the 49th International Conference on Parallel Processing\",\"volume\":\"18 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-07-04\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Workshop Proceedings of the 49th International Conference on Parallel Processing\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3409390.3409411\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Workshop Proceedings of the 49th International Conference on Parallel Processing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3409390.3409411","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

计算机系统的设计是为了向用户提供资源,而用户可能对某些资源比对其他资源更感兴趣,因此,需要一个协调方案来满足用户的需求。该方案可能实现某些策略,例如“永远不要分配超过X单位的资源Z”。一个特别令人感兴趣的策略是用户不能同时访问单个资源,这被称为互斥问题。资源管理涉及用户之间的协调和协作,通常以决策为基础。在互斥的情况下,该决定是关于授予对资源的访问权。因此,互斥对于支持资源访问管理非常有用。互斥问题的第一个真正的解决方案被称为Bakery算法,它不依赖于任何低级别的互斥。我们研究了现实世界中Bakery算法实现中的寄存器溢出问题,并提出了一种名为Bakery++的变体算法,它可以防止溢出的发生。不允许进程写入其他进程的内存,不使用额外的内存或复杂的算法或重新定义面包店中使用的操作和函数,避免了溢出。它几乎和Bakery一样简单,在实际系统中很容易实现。使用Bakery++,没有理由继续在实际计算机中实现Bakery,因为Bakery++消除了溢出的可能性,因此它比Bakery更实用。以前规避寄存器溢出问题的方法包括引入新变量或重新定义原始Bakery算法中使用的操作或函数,而Bakery++通过使用简单的条件语句来避免溢出。本文给出了一种新的互斥算法,该算法保证了不允许溢出,并且简单、正确、易于实现。面包店++具有与原始面包店相同的时间和空间复杂性。我们在PlusCal中指定了面包店++,并且使用TLC模型检查器来断言面包店++维护互斥属性,并且它从不允许溢出。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Avoiding Register Overflow in the Bakery Algorithm
Computer systems are designed to make resources available to users and users may be interested in some resources more than others, therefore, a coordination scheme is required to satisfy the users’ requirements. This scheme may implement certain policies such as “never allocate more than X units of resource Z”. One policy that is of particular interest is the inability of users to access a single resource at the same time, which is called the problem of mutual exclusion. Resource management concerns the coordination and collaboration of users, and it is usually based on making a decision. In the case of mutual exclusion, that decision is about granting access to a resource. Therefore, mutual exclusion is useful for supporting resource access management. The first true solution to the mutual exclusion problem is known as the Bakery algorithm that does not rely on any lower-lever mutual exclusion. We examine the problem of register overflow in real-world implementations of the Bakery algorithm and present a variant algorithm named Bakery++ that prevents overflows from ever happening. Bakery++ avoids overflows without allowing a process to write into other processes’ memory and without using additional memory or complex arithmetic or redefining the operations and functions used in Bakery. Bakery++ is almost as simple as Bakery and it is straightforward to implement in real systems. With Bakery++, there is no reason to keep implementing Bakery in real computers because Bakery++ eliminates the probability of overflows and hence it is more practical than Bakery. Previous approaches to circumvent the problem of register overflow included introducing new variables or redefining the operations or functions used in the original Bakery algorithm, while Bakery++ avoids overflows by using simple conditional statements. The result is a new mutual exclusion algorithm that is guaranteed never to allow an overflow and it is simple, correct and easy to implement. Bakery++ has the same temporal and spatial complexities as the original Bakery. We have specified Bakery++ in PlusCal and we have used the TLC model checker to assert that Bakery++ maintains the mutual exclusion property and that it never allows an overflow.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信