write-back/write-through/write-allocate/write-no-allocate
write-back/write-through/write-allocate/write-no-allocate
CPU读Cache时
●若hit,则CPU直接从Cache中读取数据即可。
●若miss,有两种处理方式:
>Read through,即直接从内存中读取数据;
>Read allocate,先把数据读取到Cache中,再从Cache中读数据。
写操作
先检查cache里是否有对应数据,如果有(write hit):
根据是write-back还是write-through来具体操作:
write-back:将数据更新到cache,并不更新到内存(DRAM),待后续flush cache时存入内存;
write-through:数据同时会更新到cache和内存;
如果没有(write miss):
根据是write-allocate或是write-no-allocate:
write-allocate:将要写入的位置从内存读到cache,然后按照上述write hit继续操作;
write-no-allocate:不会将要写入的数据从内存读到cache,直接将要写的数据写入内存。
transient attribute
Another new memory attribute feature in the Armv8-M architecture is that Normal memory has a new Transient attribute. If an address region is marked as Transient it means the data within is unlikely to be frequently used. A cache design could, therefore, utilize this information to prioritize transient data for cacheline evictions. A cacheline eviction operation is needed when the processor needs to store a new piece of data into the cache but all of the cache-ways of the corresponding cache index have already been used by older valid data. In the case of the Cortex-M23 and Cortex-M33 processors, this attribute is not used as (a) there is no data cache support, and (b) the AHB interface does not have any signal for transient indication. Please note, even when an Armv8-M processor has a data cache transient support, is an optional feature. This is because this feature increases the SRAM area needed for cache tags and might, therefore, not be desirable for some designs.
from: https://www.sciencedirect.com/topics/engineering/memory-attribute
device memory attributes
https://blog.csdn.net/shenhuxi_yu/article/details/90617675
https://zhuanlan.zhihu.com/p/124946496
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)
2019-12-29 linux内核符号表kallsyms简介