计算机系统结构总结_Multiprocessor

Textbook:
《计算机组成与设计——硬件/软件接口》    HI
《计算机体系结构——量化研究方法》           QR


最后一节来看看如何实现parallelism

在多处理器系统中,每个处理器(core)可能有自己专属的cache,然后多处理器共享memory。在这种情况下,当多个线程(核心)对同一个变量进行读写时,就会出现不同cache中该变量的值不一样的情况(取决于cache是write back还是write through,以及相关cacheline被evict的时间等等),这样就会导致程序运行结果出错了。

因此我们需要保证reading an address should return the last value written to that address。

这里涉及到两个问题:

  1. coherence:what value should be returned by a read operation(behavior to same location)
  2. consistency:when could a write operation be finished(behavior to multiple locations)

coherent memory system

猜你喜欢

转载自www.cnblogs.com/pdev/p/12004697.html