Design and implementation of a scalable self-adaptive reader-writer lock for multi-core systems

Bin Cai, Bingcheng Qiu, Jian Yao, Meiman Li, Gang Chen, Jing Wang, Ruilong Wu, Xu Zhang
{"title":"Design and implementation of a scalable self-adaptive reader-writer lock for multi-core systems","authors":"Bin Cai, Bingcheng Qiu, Jian Yao, Meiman Li, Gang Chen, Jing Wang, Ruilong Wu, Xu Zhang","doi":"10.1117/12.2674755","DOIUrl":null,"url":null,"abstract":"With the rapid development of multi-core processor technology, parallelization has become the main approach for modern applications to improve throughput and responsiveness. However, the increasing number of processors also poses a challenge to the scalability of parallel program performance. In a traditional single-threaded program, all data is exclusively occupied by one thread, so the performance optimization of the program mainly focuses on the algorithm logic and implementation skills of the program; while in the multi-core system environment, most multi-threaded applications have performance scalability bottleneck. That is, the application cannot make full use of the performance advantages of multiple cores, and its performance decreases as the number of processors increases. The key factor restricting the improvement of performance scalability is often the synchronization mechanism of multi-core systems. Reader-writer lock is a synchronization mechanism that divides the operation to access shared resources or data into reader lock and writer lock, which enables effective cooperation between multiple different threads and ensures that applications can operate in a multicore environment with logical consistency. However, from another perspective, the reader-writer lock mechanism also limits the scalability of concurrent execution of applications. In application scenarios with different reader/writer ratios, the performance of reader-writer locks also differs, restricting the scalability of the performance of applications in multicore systems. Therefore, in a multi-core environment, it is of practical significance to implement a new type of readerwriter lock with scalable performance. This new reader-writer lock may automatically adjust the lock acquisition path according to the read/write ratio of the application scenario. In view of the shortcomings of the current reader-writer locks, this paper proposes a simple, efficient, optimized, and easy-to-implement adaptive reader-writer lock mechanism and interface which is suitable for multi-core environments, as well as application scenarios with different read/, write ratios. This mechanism gives full play to the high performance of multi-core systems and automatically adjusts lock acquisition according to different application scenarios. There are only minor changes to the application by replacing the original reader-writer lock instance and API interface function calls with an adaptive reader-writer lock instance and the API interface function calls for the adaptive reader-writer lock. The mechanism enables good scalability and improves the concurrency and scalability of reader-writer locks in multi-core systems in application scenarios with different read/write ratios. It will be conducive to meeting the growing demand for low latency, high throughput, and high concurrency processors.","PeriodicalId":286364,"journal":{"name":"Conference on Computer Graphics, Artificial Intelligence, and Data Processing","volume":"21 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-05-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Conference on Computer Graphics, Artificial Intelligence, and Data Processing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1117/12.2674755","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

With the rapid development of multi-core processor technology, parallelization has become the main approach for modern applications to improve throughput and responsiveness. However, the increasing number of processors also poses a challenge to the scalability of parallel program performance. In a traditional single-threaded program, all data is exclusively occupied by one thread, so the performance optimization of the program mainly focuses on the algorithm logic and implementation skills of the program; while in the multi-core system environment, most multi-threaded applications have performance scalability bottleneck. That is, the application cannot make full use of the performance advantages of multiple cores, and its performance decreases as the number of processors increases. The key factor restricting the improvement of performance scalability is often the synchronization mechanism of multi-core systems. Reader-writer lock is a synchronization mechanism that divides the operation to access shared resources or data into reader lock and writer lock, which enables effective cooperation between multiple different threads and ensures that applications can operate in a multicore environment with logical consistency. However, from another perspective, the reader-writer lock mechanism also limits the scalability of concurrent execution of applications. In application scenarios with different reader/writer ratios, the performance of reader-writer locks also differs, restricting the scalability of the performance of applications in multicore systems. Therefore, in a multi-core environment, it is of practical significance to implement a new type of readerwriter lock with scalable performance. This new reader-writer lock may automatically adjust the lock acquisition path according to the read/write ratio of the application scenario. In view of the shortcomings of the current reader-writer locks, this paper proposes a simple, efficient, optimized, and easy-to-implement adaptive reader-writer lock mechanism and interface which is suitable for multi-core environments, as well as application scenarios with different read/, write ratios. This mechanism gives full play to the high performance of multi-core systems and automatically adjusts lock acquisition according to different application scenarios. There are only minor changes to the application by replacing the original reader-writer lock instance and API interface function calls with an adaptive reader-writer lock instance and the API interface function calls for the adaptive reader-writer lock. The mechanism enables good scalability and improves the concurrency and scalability of reader-writer locks in multi-core systems in application scenarios with different read/write ratios. It will be conducive to meeting the growing demand for low latency, high throughput, and high concurrency processors.
多核系统中可扩展自适应读写锁的设计与实现
随着多核处理器技术的迅速发展,并行化已成为现代应用程序提高吞吐量和响应速度的主要途径。然而,处理器数量的不断增加也对并行程序性能的可扩展性提出了挑战。在传统的单线程程序中,所有数据都被一个线程独占,因此程序的性能优化主要集中在程序的算法逻辑和实现技巧上;而在多核系统环境下,大多数多线程应用程序存在性能可伸缩性瓶颈。即应用程序不能充分利用多核的性能优势,随着处理器数量的增加,其性能会下降。制约性能可扩展性提高的关键因素往往是多核系统的同步机制。读写锁是一种将访问共享资源或数据的操作分为读锁和写锁的同步机制,使多个不同的线程之间能够有效地协同工作,保证应用程序在多核环境下的逻辑一致性。然而,从另一个角度来看,读写锁机制也限制了应用程序并发执行的可伸缩性。在不同读写比例的应用场景下,读写锁的性能也会有所不同,从而限制了多核系统中应用性能的可扩展性。因此,在多核环境下,实现一种性能可扩展的新型读写锁具有重要的现实意义。这种新的读写锁可以根据应用场景的读写比例自动调整锁获取路径。针对当前读写锁存在的不足,本文提出了一种简单、高效、优化、易于实现的自适应读写锁机制和接口,适用于多核环境以及不同读写比的应用场景。该机制充分发挥了多核系统的高性能,并根据不同的应用场景自动调整锁获取。通过将原始的读写器锁实例和API接口函数调用替换为自适应读写器锁实例和自适应读写器锁的API接口函数调用,只对应用程序进行了很小的更改。该机制具有良好的可扩展性,提高了多核系统中读写锁在不同读写比例应用场景下的并发性和可扩展性。它将有助于满足对低延迟、高吞吐量和高并发处理器日益增长的需求。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
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学术官方微信