- 博客(2)
- 资源 (1)
- 收藏
- 关注
原创 内存一致模型——顺序一致模型
内存一致模型——顺序一致模型顺序一致模型,是最常见的内存一致模型,定义如下: 【如果一个多处理器系统是顺序一致的】,那么,无论程序怎么运行,结果都与各处理器各自轮流运行后的结果相同,且各处理器内部的执行顺序由程序决定。 从定义中, 可以得出,顺序一致模型有如下要求: - 保证单一处理器内部的执行顺序 - 保证多处理器操作同一块内存时的先后顺序如图所示:总线结构保证在相同时间内对指定内存块的访问
2016-12-21 18:01:53 913
原创 多线程——内存访问顺序 (序)
一直很好奇atomic是怎么实现的,最近查了一些资料,想开始记录一些东西。 首先开始的就是看源码了,找到的源码中有各种宏定义,看起来有些费力,不过看懂了一些之后,后面的宏就顺眼多了,不多说。 接下来,就找到了一些memory order的问题,之前没深究,总以为这可能是字节序吧,从字面上来看很相近,但是往深了看之后,发现,这不是字节序(byte order, endian)。这里的memory
2016-12-21 14:13:35 962
windows编程(第6版)
2012-06-28
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人