{"title":"动态连接可写LL/SC和CAS的持久算法","authors":"P. Jayanti, S. Jayanti, Sucharita Jayanti","doi":"10.48550/arXiv.2302.00135","DOIUrl":null,"url":null,"abstract":"We present durable implementations for two well known universal primitives -- CAS (compare-and-swap), and its ABA-free counter-part LLSC (load-linked, store-conditional). All our implementations are: writable, meaning they support a Write() operation; have constant time complexity per operation; allow for dynamic joining, meaning newly created processes (a.k.a. threads) of arbitrary names can join a protocol and access our implementations; and have adaptive space complexities, meaning the space use scales in the number of processes $n$ that actually use the objects, as opposed to previous protocols which are designed for a maximum number of processes $N$. Our durable Writable-CAS implementation, DuraCAS, requires $O(m + n)$ space to support $m$ objects that get accessed by $n$ processes, improving on the state-of-the-art $O(m + N^2)$. By definition, LLSC objects must store\"contexts\"in addition to object values. Our Writable-LLSC implementation, DuraLL, requires $O(m + n + C)$ space, where $C$ is the number of\"contexts\"stored across all the objects. While LLSC has an advantage over CAS due to being ABA-free, the object definition seems to require additional space usage. To address this trade-off, we define an External Context (EC) variant of LLSC. Our EC Writable-LLSC implementation is ABA-free and has a space complexity of just $O(m + n)$. To our knowledge, we are the first to present durable CAS algorithms that allow for dynamic joining, and our algorithms are the first to exhibit adaptive space complexities. To our knowledge, we are the first to implement any type of durable LLSC objects.","PeriodicalId":89463,"journal":{"name":"Proceedings of the ... International Symposium on High Performance Distributed Computing","volume":"14 1","pages":"25:1-25:20"},"PeriodicalIF":0.0000,"publicationDate":"2023-01-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Durable Algorithms for Writable LL/SC and CAS with Dynamic Joining\",\"authors\":\"P. Jayanti, S. Jayanti, Sucharita Jayanti\",\"doi\":\"10.48550/arXiv.2302.00135\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We present durable implementations for two well known universal primitives -- CAS (compare-and-swap), and its ABA-free counter-part LLSC (load-linked, store-conditional). All our implementations are: writable, meaning they support a Write() operation; have constant time complexity per operation; allow for dynamic joining, meaning newly created processes (a.k.a. threads) of arbitrary names can join a protocol and access our implementations; and have adaptive space complexities, meaning the space use scales in the number of processes $n$ that actually use the objects, as opposed to previous protocols which are designed for a maximum number of processes $N$. Our durable Writable-CAS implementation, DuraCAS, requires $O(m + n)$ space to support $m$ objects that get accessed by $n$ processes, improving on the state-of-the-art $O(m + N^2)$. By definition, LLSC objects must store\\\"contexts\\\"in addition to object values. Our Writable-LLSC implementation, DuraLL, requires $O(m + n + C)$ space, where $C$ is the number of\\\"contexts\\\"stored across all the objects. While LLSC has an advantage over CAS due to being ABA-free, the object definition seems to require additional space usage. To address this trade-off, we define an External Context (EC) variant of LLSC. Our EC Writable-LLSC implementation is ABA-free and has a space complexity of just $O(m + n)$. To our knowledge, we are the first to present durable CAS algorithms that allow for dynamic joining, and our algorithms are the first to exhibit adaptive space complexities. To our knowledge, we are the first to implement any type of durable LLSC objects.\",\"PeriodicalId\":89463,\"journal\":{\"name\":\"Proceedings of the ... International Symposium on High Performance Distributed Computing\",\"volume\":\"14 1\",\"pages\":\"25:1-25:20\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-01-31\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the ... International Symposium on High Performance Distributed Computing\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.48550/arXiv.2302.00135\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the ... International Symposium on High Performance Distributed Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.48550/arXiv.2302.00135","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2
摘要
我们提出了两个众所周知的通用原语的持久实现——CAS(比较与交换)和它的无aba的对应部分LLSC(加载链接、存储条件)。我们所有的实现都是:可写的,这意味着它们支持Write()操作;每次操作具有恒定的时间复杂度;允许动态连接,这意味着任意名称的新创建进程(也称为线程)可以加入协议并访问我们的实现;并且具有自适应的空间复杂性,这意味着空间使用在实际使用对象的进程数量中缩放,而不是之前的协议,它是为最大进程数量设计的。我们持久的可写cas实现DuraCAS需要$O(m + n)$空间来支持由$n$进程访问的$m$对象,从而改进了最先进的$O(m + n ^2)$。根据定义,除了对象值之外,LLSC对象还必须存储“上下文”。我们的Writable-LLSC实现DuraLL需要$O(m + n + C)$空间,其中$C$是存储在所有对象中的“上下文”的数量。虽然LLSC由于没有aba而比CAS有优势,但对象定义似乎需要额外的空间使用。为了解决这种权衡,我们定义了LLSC的外部上下文(EC)变体。我们的EC Writable-LLSC实现是无aba的,空间复杂度仅为$O(m + n)$。据我们所知,我们是第一个提出允许动态连接的持久CAS算法的人,我们的算法是第一个展示自适应空间复杂性的算法。据我们所知,我们是第一个实现任何类型的持久LLSC对象的人。
Durable Algorithms for Writable LL/SC and CAS with Dynamic Joining
We present durable implementations for two well known universal primitives -- CAS (compare-and-swap), and its ABA-free counter-part LLSC (load-linked, store-conditional). All our implementations are: writable, meaning they support a Write() operation; have constant time complexity per operation; allow for dynamic joining, meaning newly created processes (a.k.a. threads) of arbitrary names can join a protocol and access our implementations; and have adaptive space complexities, meaning the space use scales in the number of processes $n$ that actually use the objects, as opposed to previous protocols which are designed for a maximum number of processes $N$. Our durable Writable-CAS implementation, DuraCAS, requires $O(m + n)$ space to support $m$ objects that get accessed by $n$ processes, improving on the state-of-the-art $O(m + N^2)$. By definition, LLSC objects must store"contexts"in addition to object values. Our Writable-LLSC implementation, DuraLL, requires $O(m + n + C)$ space, where $C$ is the number of"contexts"stored across all the objects. While LLSC has an advantage over CAS due to being ABA-free, the object definition seems to require additional space usage. To address this trade-off, we define an External Context (EC) variant of LLSC. Our EC Writable-LLSC implementation is ABA-free and has a space complexity of just $O(m + n)$. To our knowledge, we are the first to present durable CAS algorithms that allow for dynamic joining, and our algorithms are the first to exhibit adaptive space complexities. To our knowledge, we are the first to implement any type of durable LLSC objects.