码迷,mamicode.com
首页 > 其他好文 > 详细

Microcomputer Principle - Memory Reordering

时间:2014-11-25 14:26:57      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:memory reordering


A trip to main memory costs hundreds of clock cycles on commodity hardware. Processors use caching to decrease the costs of memory latency by orders of magnitude. These caches re-order pending memory operations for the sake of performance. In other words, the reads and writes of a program are not necessarily performed in the order in which they are given to the processor. When data is immutable and/or confined to the scope of one thread these optimizations are harmless. Combining these optimizations with symmetric multi-processing and shared mutable state on the other hand can be a nightmare. A program can behave non-deterministically when memory operations on shared mutable state are re-ordered.

Microcomputer Principle - Memory Reordering

标签:memory reordering

原文地址:http://blog.csdn.net/troubleshooter/article/details/41480923

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!