C++中的原子操作及其使用  被引量:6

Atomic Operations and Its Application in C++

在线阅读下载全文

作  者:潘圆圆[1] 李德华[1] 

机构地区:[1]华中科技大学自动化学院,武汉430074

出  处:《计算机与数字工程》2013年第11期1853-1855,共3页Computer & Digital Engineering

摘  要:原子操作是一种简单高效的线程同步方法,C++11标准将原子操作加入了标准库。首先介绍原子操作的基本原理与实现机制,然后介绍了C++的多线程内存模型与内存屏障以及C++标准库中的原子操作基本方法、行为与使用,接下来使用原子操作实现了简单的生产者消费者模型,最后说明原子操作优缺点。Atomic operation is a simple and efficient thread synchronization methods, the atomic operation has been added to the stand- ard library of C++. First, the basic principles and implementation mechanisms of atomic operations is introduced, then, C++ multithread- ed memory model, the memory barrier, basic method of atomic operations, behavior and use of atomic operations in C++ standard library are described. Then use atomic operations to achieve a simple model of producers and consumers. At last shows advantages and disadvantages of atomic operation.

关 键 词:原子操作 内存屏障 线程同步 

分 类 号:TP391[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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