Memory ordering. Two processors.

折月煮酒 提交于 2019-12-12 02:39:31

问题


This example comes from 64-IA-32 Architectures Software Developers Manual.

And I cannot understand why store of CPU #0 must be visible for other processors? In that concrete example ( when r1 = 1, r2 = 1) I agree that it is obvious that store made by CPU #0 must be retired firstly- I mean the 1 value must be in memory/cache in fact ( not in store buffer).

But what about general case? Is it possible the following situation:

CPU#0 stored: mov [_x], 1 but it was stored in CPU#0's store buffer, and then CPU#1 loaded: mov r1, [_x] and in fact, r1 is equal to 0?

来源:https://stackoverflow.com/questions/38331975/memory-ordering-two-processors

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!