Stephen Hoffman<p><span class="h-card" translate="no"><a href="https://mstdn.ca/@jfmezei" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>jfmezei</span></a></span> :How long are data blocks for each entry in the in-CPU cache? 64 bits ? 128 bytes ? 1 page ? </p><p>It varies. Most implementations will use one cache block size at a time at a given cache level, but that size and the size and the organization of the caches varies.</p><p>:Does this vary from architecture to architecture or even inside an architecture? </p><p>Yes. Alpha caching varied by processor and by implementation, all within the limits of the Alpha architecture.</p><p>:Is it totally transparent when writing at OS level?</p><p>Totally transparent? No.</p><p>Details, such as what was locally called word tearing, alignment, memory timing, and memory lock processing, all get involved. </p><p>Similar requirements can arise in apps.</p><p>There are a few other wrinkles I’d prefer to not meet again, too.</p><p>Mostly transparent? Yes.</p><p>:And in multi core with coherent caches, when a core does a write to RAM, does memory controller propagate this to all other cores in case they have it cached? or does memory controller know which core has what in cache and send only relevant updates?</p><p>It depends. Most of what I’ve met will mark the cache contents as being invalid, and will await the next opportunity to wait for main memory to load the data, or to wait for a load from L3, or such. I can’t recall ever working on a cache-coherent multiprocessor that tried to reload the cache everywhere.</p><p>Alpha could load cache speculatively, or explicitly, or evict as needed.</p><p><a href="http://bitsavers.org/pdf/dec/alpha/system_reference/Alpha_System_Reference_Manual_Version_7_1997.pdf" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">http://</span><span class="ellipsis">bitsavers.org/pdf/dec/alpha/sy</span><span class="invisible">stem_reference/Alpha_System_Reference_Manual_Version_7_1997.pdf</span></a></p><p>WP has a reasonable description, as well: </p><p><a href="https://en.wikipedia.org/wiki/Cache_(computing)" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">en.wikipedia.org/wiki/Cache_(c</span><span class="invisible">omputing)</span></a></p><p>Deeper still:</p><p><a href="https://www.cs.swarthmore.edu/~kwebb/cs31/f18/memhierarchy/caching.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">cs.swarthmore.edu/~kwebb/cs31/</span><span class="invisible">f18/memhierarchy/caching.html</span></a></p><p>More for amusement, figures 5 and 6 nicely show the shifting scale of the complexity of modern computer systems:</p><p><a href="https://www.computer.org/csdl/journal/ts/2021/06/08704965/19HKUhJMVAQ" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">computer.org/csdl/journal/ts/2</span><span class="invisible">021/06/08704965/19HKUhJMVAQ</span></a></p><p><a href="https://infosec.exchange/tags/digitalequipment" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>digitalequipment</span></a> <a href="https://infosec.exchange/tags/dec" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dec</span></a><br><a href="https://infosec.exchange/tags/alpha" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>alpha</span></a> <a href="https://infosec.exchange/tags/computerarchitecture" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>computerarchitecture</span></a> <a href="https://infosec.exchange/tags/retrocomputing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retrocomputing</span></a></p>