English 中文(简体)
一致性如何影响这一情况下的业绩
原标题:How cache coherence affects the performance in this case

如果核心A正在修改一个变量X,核心B正在读到该变量(X)。 在此情况下,一项切合一致议定书将更新核心B的切身,因为X经核心A修改,而这种切合将减缓核心B的执行。 然而,考虑到变数X在其海滩上居住,这种切合也会影响核心A的绩效。

最佳回答

是的。 有若干方法可以影响业绩。 人员使用的标准议定书是《多国企业(现代化、共享、无效)》的一些变量,有时是O(所有权人),而且经常是E(排他性)。 例如,核心A将在经过修改的(或排他性)状态中开始,而核心B的解读将迫使核心A转变为共同国家。 这一行动在海滩上循环,因为核心在任何特定时间只能开展这么多的行动。 这对核心A的影响非常大,尽管它不是关键的道路。 如果核心A再次书写,则影响更大。 由于海滩线位于共享的(或无效的)状态,它必须发出将自己升级到M或E的要求。 这项请求必须去B核心部分。 这项行动正处于关键的道路上,在海滩区升级之前,书面工作可以结束。 尽管如此,文字通常被缓冲,处理器一般不会因这一行动而受阻。

问题回答

是的,在目前使用ME(O)SI一致性议定书的微层装置上,它将放慢对<代码>X的更新。 其原因是,Bs读到后将把含有<代码>X的切条线带入共同国家,然后再将其复制,然后用纸件将B复制件无效,以便进入排他性国家,然后再加以修改。

That all said, A s writes to X might not actually stall A s execution pipeline. This depends on the memory consistency model of the architecture and programming language, and whether the write is forced out as an atomic operation or a subsequent write fence.





相关问题
Fastest method for running a binary search on a file in C?

For example, let s say I want to find a particular word or number in a file. The contents are in sorted order (obviously). Since I want to run a binary search on the file, it seems like a real waste ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Trying to split by two delimiters and it doesn t work - C

I wrote below code to readin line by line from stdin ex. city=Boston;city=New York;city=Chicago and then split each line by ; delimiter and print each record. Then in yet another loop I try to ...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

Encoding, decoding an integer to a char array

Please note that this is not homework and i did search before starting this new thread. I got Store an int in a char array? I was looking for an answer but didn t get any satisfactory answer in the ...

热门标签