摘要
多线程环境下,线程同步伴随着多线程的产生而产生,程序员对于共享内存互斥同步访问的思维已经根深蒂固。由于锁的存在,当访问互斥锁保护的共享内存时,线程首先请求锁的允许,然后才被接受访问共享内存,否则只能等待其它线程释放锁,同时锁也带来了很多负面影响。Lock Free一个崭新的多线程共享内存的同步访问技术,抛开了锁的概念,多线程平行运行,尤其是在多核时代更显优势。但Lock Free技术应用技巧性很强,难度比较大,应用范围一直非常受限,本文旨在揭示Lock Free技术应用的一般规律,使其在多核时代大放异彩。
In multi - threaded environment, thread synchronization with the arising generated multi - threaded, Programmers for the simuhaneous access to shared memory mutual exclusion of thinking has been deeply rooted. Mutex lock to protect access to shared memory, thread lock to allow the first request, and then was finally accepted, access to shared memory, or else have to wait for other thread to release the lock. However, due to the existence of the lock, but also brings with it many negative effects. The Lock Free a new multi - threaded shared memory synchronization access technology, to set aside the concept of locks, multi - threaded parallel operation, especially in the multi- core era is even more advantages. However, Lock Free technology skills are highly difficult to relatively large range of applications is very limited agreement, this paper aims to reveal the Lock Free technology applications in the general law to make it shine in the muhicore era.
出处
《微计算机应用》
2010年第1期50-57,共8页
Microcomputer Applications