首页 | 本学科首页   官方微博 | 高级检索  
     

临界区读写锁的实现
引用本文:孙建杰,陈佳品.临界区读写锁的实现[J].计算机与现代化,2011(9):215-219.
作者姓名:孙建杰  陈佳品
作者单位:上海交通大学微纳科学技术研究院,上海,200240
摘    要:针对Windows环境下多线程同步缺乏标准的读写锁机制,本文逐步论述利用临界区对读写锁的3种实现方式。通过对不同数量的临界区进行组合操作,可以达到读写锁的设计目的,并产生不同的读/写优先倾向。由于尝试在多线程中对读写锁进行复杂的交叉操作,故进一步对特定环境下的临界区内部细节进行分析和测试,并最终确保利用临界区实现读写锁的可靠性。最后是对读写锁尝试加解锁补充功能的一些讨论。

关 键 词:多线程同步  读写锁  临界区  死锁  写优先

Implementation of Reader-writer Lock by Critical Section
SUN Jian-jie,CHEN Jia-pin.Implementation of Reader-writer Lock by Critical Section[J].Computer and Modernization,2011(9):215-219.
Authors:SUN Jian-jie  CHEN Jia-pin
Affiliation:SUN Jian-jie,CHEN Jia-pin(Research Institute of Micro/Nano Science and Technology,Shanghai Jiao Tong University,Shanghai 200240,China)
Abstract:For the lack of a standard reader-writer lock mechanism for the multi-thread synchronization in the Windows environment,the paper discusses three implementations on the reader-writer lock in use of the critical section and gradually reveals the advantages and disadvantages.The design of a reader-writer lock can be achieved by numbers of critical sections,and the different combinations will have the diverse read / write priority tendencies.Because multiple threads try to enter and leave the reader-writer loc...
Keywords:multi-thread synchronization  reader-writer lock  critical section  dead lock  write priority  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号