临界区读写锁的实现  被引量:3

Implementation of Reader-writer Lock by Critical Section

在线阅读下载全文

作  者:孙建杰[1] 陈佳品[1] 

机构地区:[1]上海交通大学微纳科学技术研究院,上海200240

出  处:《计算机与现代化》2011年第9期215-219,共5页Computer and Modernization

摘  要:针对Windows环境下多线程同步缺乏标准的读写锁机制,本文逐步论述利用临界区对读写锁的3种实现方式。通过对不同数量的临界区进行组合操作,可以达到读写锁的设计目的,并产生不同的读/写优先倾向。由于尝试在多线程中对读写锁进行复杂的交叉操作,故进一步对特定环境下的临界区内部细节进行分析和测试,并最终确保利用临界区实现读写锁的可靠性。最后是对读写锁尝试加解锁补充功能的一些讨论。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 lock on the complex cross-operation,there needs further analysis and testing for the internal details of the critical section in the specific circumstances to ultimately ensure the reliability of the reader-writer lock's implementation.The paper also provides some details on try-lock mechanism.

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

分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象