{"title":"读写锁的强尝试锁","authors":"Andreia Correia, P. Ramalhete","doi":"10.1145/3178487.3178519","DOIUrl":null,"url":null,"abstract":"A reader-writer lock provides basic methods for shared and exclusive lock acquisition. A thread calling one of these methods may have to wait indefinitely to enter its critical section, with no guarantee of completion. We present two new reader-writer strong trylock algorithms, where a call to a trylock method always completes in a finite number of steps, and is guaranteed to succeed unless there is a linearizable history for which another thread has the lock. The first algorithm, named StrongTryRW, uses a single word of memory to reach consensus, thus yielding reduced scalability for readers. To address read scalability, we designed StrongTryRWRI which matches in throughput the current state of the art reader-writer lock algorithms.","PeriodicalId":193776,"journal":{"name":"Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming","volume":"22 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-02-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":"{\"title\":\"Strong trylocks for reader-writer locks\",\"authors\":\"Andreia Correia, P. Ramalhete\",\"doi\":\"10.1145/3178487.3178519\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A reader-writer lock provides basic methods for shared and exclusive lock acquisition. A thread calling one of these methods may have to wait indefinitely to enter its critical section, with no guarantee of completion. We present two new reader-writer strong trylock algorithms, where a call to a trylock method always completes in a finite number of steps, and is guaranteed to succeed unless there is a linearizable history for which another thread has the lock. The first algorithm, named StrongTryRW, uses a single word of memory to reach consensus, thus yielding reduced scalability for readers. To address read scalability, we designed StrongTryRWRI which matches in throughput the current state of the art reader-writer lock algorithms.\",\"PeriodicalId\":193776,\"journal\":{\"name\":\"Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming\",\"volume\":\"22 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2018-02-10\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"4\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3178487.3178519\",\"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 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3178487.3178519","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A reader-writer lock provides basic methods for shared and exclusive lock acquisition. A thread calling one of these methods may have to wait indefinitely to enter its critical section, with no guarantee of completion. We present two new reader-writer strong trylock algorithms, where a call to a trylock method always completes in a finite number of steps, and is guaranteed to succeed unless there is a linearizable history for which another thread has the lock. The first algorithm, named StrongTryRW, uses a single word of memory to reach consensus, thus yielding reduced scalability for readers. To address read scalability, we designed StrongTryRWRI which matches in throughput the current state of the art reader-writer lock algorithms.