[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-83032-en":3,"doc-seo-83032-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},83032,7971461740909,"Levi","https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d",8,"Research & Report","Efficient and Robust Lock-Free Multi-Word Compare-and-Swap via Contention-Aware Helping","Efficient concurrent access to shared memory is critical for high-performance data structures, where lock-based synchronization can limit scalability and threaten liveness through deadlocks. Lock-free designs using single-word CAS avoid locks but face complexity from unavoidable intermediate states. Multi-word compare-and-swap (MCAS) provides an atomic primitive for updating multiple memory locations, yet under high contention it suffers from helping-induced cache invalidations and performance loss, and may be vulnerable to the ABA problem. This work proposes a new lock-free MCAS algorithm introducing contention-aware helping, fast garbage collection counters, and version embedding for consistency and ABA suppression, achieving up to 3× throughput over state of the art.","IEICE TRANS. ??, VOL.Exx–??, NO.xx XXXX 200x  \n1  \nPAPER  \nEfficient and Robust Lock-Free Multi-Word Compare-and-Swap via Contention-Aware Helping  \nMotoki UNNO†, Kento SUGIURA†, Nonmembers, and Yoshiharu ISHIKAWA†, Member  \narXiv :2607 .06034v 1 [ cs .DB] 7 Jul 2026  \nSUMMARY Efficient concurrent access to shared memory remains a central focus for researchers seeking to enhance data structure performance. Lock-based synchronization often limits scalability and introduces liveness issues such as deadlocks. In contrast, implementing non-blocking structures with single-word compare-and-swap (CAS) instructions increases algorithmic complexity because of unavoidable intermediate states. Multi-word compare-and-swap (MCAS) operations offer a practical primitive for atomically updating multiple discrete memory locations, thereby addressing these challenges. However, under high contention, helping mechanisms designed to guarantee lock-freedom may cause excessive cache invalidations and significant performance degradation. Furthermore, existing approaches are vulnerable to the ABA problem. Current lock-free MCAS algorithms may duplicate the execution of the same operation, leading to inconsistent states in certain edge cases. To address these challenges, this paper introducesa new lock-free MCAS algorithm that achieves both efficiency and consistency. First, we propose a contention-aware helping mechanism that dynamically regulates the number of concurrent helpers through exponential backoff and embedded entry counters. These counters also enable a fast garbage-collection path, significantly reducing memory management overhead. Second, we introduce a version embedding approach to suppress the ABA problem during MCAS operations. Although version embedding requires several bits per target memory region to store version information, embedded versions allow helpers to avoid duplicated MCAS executions. Experimental results show that the proposed method achieves up to three times the throughput of the state-of-the-art lock-free MCAS algorithm. Moreover, the results indicate that version embedding is sufficient to prevent the ABA problem in practical scenarios.  \nkey words: lock-free algorithm, multi-word compare-and-swap (MCAS), contention-aware optimization, ABA problem prevention  \n1. Introduction  \nEfficient concurrent access to shared data structures is essential for achieving high performance in in-memory databases [1] and complex index structures [2] . Although many systems employ lock-based synchronization, this approach incurs performance overheads and liveness issues, such as deadlocks, which can constrain overall scalability. In contrast, algorithms utilizing the compare-and-swap (CAS) instruction can eliminate the need for locks and facilitate the construction of non-blocking data structures. Such algorithms and structures are considered lock-free if they guarantee system progress as long as at least one thread remains active [3] . For example, most lock-based structures possess the deadlock-free property, which requires that all threads remain active to guarantee progress; if a lock holder halts or terminates unexpectedly, other threads may be unable to pro-  \nManuscript received January 1, 2024 .  \nManuscript revised January 1, 2024 .  \n†Graduate School of Informatics, Nagoya University, Nagoyashi  \nDOI: 10.1587/trans.E0.??.1  \nceed because of an abandoned lock. Lock-free algorithms maintain progress even in the presence of inactive threads, thereby providing more robust processing.  \nAlthough lock-freedom is a highly desirable property, designing correct lock-free algorithms remains a significant challenge. The CAS instruction atomically compares a single memory word with an expected value and, only if they match, stores the desired value in the target region. Additionally, because the CAS instruction returns the current (pre-swapped) value, a thread can determine whether the operation succeeded: if the returned value matches t","cbCaieLcs7g3o6Hk","https://ap.wps.com/l/cbCaieLcs7g3o6Hk","pdf",2764144,3,1,10,"English","en",105,"# Introduction\n## Motivation: lock-based vs lock-free synchronization\n## CAS and the need for MCAS\n## Challenges in current lock-free MCAS\n## Proposed direction","[{\"question\":\"为什么需要用MCAS而不是只用单词级CAS？\",\"answer\":\"单词级CAS在跨多个内存位置保持一致性时会引入不可避免的中间状态，显著增加算法复杂度；MCAS能同时交换多个位置，从而消除中间状态并简化一致性实现。\"},{\"question\":\"当前锁自由MCAS在高竞争下会遇到哪些性能问题？\",\"answer\":\"为保证锁自由，MCAS依赖helping机制推进中间状态；在高竞争时，helpers会并发修改相同目标内存区域，导致CPU缓存失效频繁，从而造成性能显著下降。\"},{\"question\":\"论文如何抑制MCAS中的ABA问题？\",\"answer\":\"论文提出version embedding，通过在目标内存区域嵌入版本信息抑制ABA；嵌入版本使helpers能够避免重复执行MCAS，从而在实际场景中足以防止ABA问题。\"}]",1784184776,25,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"efficient-and-robust-lock-free-multi-word-compare-and-swap-via-contention-aware-helping","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,50],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":20},"https://docshare.wps.com/document/research-report/",{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/efficient-and-robust-lock-free-multi-word-compare-and-swap-via-contention-aware-helping/83032/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-24","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"为什么需要用MCAS而不是只用单词级CAS？","Question",{"text":75,"@type":76},"单词级CAS在跨多个内存位置保持一致性时会引入不可避免的中间状态，显著增加算法复杂度；MCAS能同时交换多个位置，从而消除中间状态并简化一致性实现。","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"当前锁自由MCAS在高竞争下会遇到哪些性能问题？",{"text":80,"@type":76},"为保证锁自由，MCAS依赖helping机制推进中间状态；在高竞争时，helpers会并发修改相同目标内存区域，导致CPU缓存失效频繁，从而造成性能显著下降。",{"name":82,"@type":73,"acceptedAnswer":83},"论文如何抑制MCAS中的ABA问题？",{"text":84,"@type":76},"论文提出version embedding，通过在目标内存区域嵌入版本信息抑制ABA；嵌入版本使helpers能够避免重复执行MCAS，从而在实际场景中足以防止ABA问题。","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,134],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":22,"doc_module":4,"doc_module_name":46,"category_name":132,"show_sort_weight":22,"slug":133},"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":46,"category_name":136,"show_sort_weight":106,"slug":137},19,"General","general"]