This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

6678:多核共享一个数组时,如何保证cache一致性

    将一个大小为100byte的数组Buffer放在共享内存中,使用core0对buffer的前50个byte进行处理,使用core1对buffer的后50byte进行处理。想要保证处理结束之后,共享内存里面的数组为处理结束的值。

    cache的文档里面说L1D的line大小为64k,因此write back等操作最小单元是一个line,那么对于这样小数组,如何保证core0 维护一致性的时候不会覆盖掉core1处理好的数据?