期刊文献+

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

Implementation of Reader-writer Lock by Critical Section
下载PDF
导出
摘要 针对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.
出处 《计算机与现代化》 2011年第9期215-219,共5页 Computer and Modernization
关键词 多线程同步 读写锁 临界区 死锁 写优先 multi-thread synchronization reader-writer lock critical section dead lock write priority
  • 相关文献

参考文献13

  • 1Granunke G,Thakkar S. Synchronization algorithms for shared- memory multiprocessors [ J ]. IEEE Computer, 1990, 23 ( 6 ) : 60-69.
  • 2Li Z. Compiler algorithms for event variable synchronization [C]//Proceedings of the 5th International Conference on Supereomputing. 1991:85-95.
  • 3Martinez J, Torrellas J. Speculative synctu'onization : Program- mability and performance for parallel codes [ J ]. IEEE Micro., 2003,23(6) :126-134.
  • 4Bacon D F, Konuru R, Murthy C, et al. Thin locks : Feather- weight synchronization for Java [ J ]. ACM SIGPLAN No- tices, 2004,39 ( 4 ) : 583-595.
  • 5Wang L, Stoller S D. Static analysis of atomicity for pro- grams with non-blocking synchronization [ C ]//Proceedings of the Tenth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. Chicago,2005 : 61-71.
  • 6Richard StevensW,Stephen A Rago.Unix环境高级编程(第2版)[M].尤晋元,等译.北京:人民邮电出版社,2006.
  • 7Johnson M Hart. Windows System Prograinming(4th Edi- tion ) [ M ]. Addison-Wesley Professional, 2010.
  • 8IEEE Std 1003.1, Information Technology--Portable Oper- ating System Interface ( POSIX ) Part 1 : System Appli- cation Program Interface(API) [ C Language] [ S].
  • 9王欣明,金蓓弘,张昕.用不对称的P/V操作设计并发算法[J].计算机工程与应用,2005,41(12):65-69. 被引量:3
  • 10David R Butenhof. Programming with POSIX (R) Threads [ M]. Addison-Wesley Professional, 1997.

二级参考文献11

  • 1Jim Gray. Principles of Transaction Processing[M].Morgan Kaufmann Publishers, Inc, 1997.
  • 2David A Solomon,Mark E.Inside Microsoft Windows 2000[M].Third Edition, Microsoft Press,2000.
  • 3Maurice J Bach.The Desgin of the Unix Operating System[M].Prentice Hall ,Inc, 1990.
  • 4Andrew S Tannanbaum. Distributed Systems-Principles and Paradigms [M].Prentice Hall,Inc ,2002.
  • 5Bil Lewis,Daniel J Berg. PThread Primer[M].Sun Microsystem,Inc,1996.
  • 6Gregory R Andrews.Funndations of Multithread Parallel and Distributed Programming[M].Prentice Hall/Pearson,2000.
  • 7M Morris Mano. Computer Systems Architecture[M].3rd Ed,Prentice Hall/Pearson, 2000.
  • 8Kurt Wall. GNU/Linux Programming[M].Unleashed Sams Publishing,2001.
  • 9L Lamport. Concurrent reading and writing[J].Communication of the ACM, 1977; 20 ( 11 ): 806~811.
  • 10L Lamport. On interprocess communication,parts 1 and 2[J].Distributed Computing, 1986; 1 ( 1 ) :77~101.

共引文献4

同被引文献21

引证文献3

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部