acmilan2222的个人空间 https://blog1.eetop.cn/?856756 [收藏] [复制] [分享] [RSS]

日志

[转]Write-back/through 与write-allocate/no allocate的组合

已有 3982 次阅读| 2013-3-4 05:08 |个人分类:System on Chip Architecture

其实就是diligence matches laziness。

Why:

‘Write back’ caches use ‘write allocate’

‘Write through’ caches use ‘no-write allocate’

 

 

Answer:

‘Write back’ means: If write-hit in cache, update cache contents only and delay updating memory. This idea is based on the Temporal Locality, for this address block we have just updated is highly probable that it would be updated (written) again in a short time period. If we only update the cache and update the memory only when it is necessary, we can reduce the frequency of writing memory, thus accelerates writing.

‘Write allocate’ mean: If write-not-hit in cache, update in memory and put the address block into cache afterwards. This idea is also based on the Temporal Locality, for the address block we have just updated is highly probable that it would be read in a short time period. If we put this block into cache, it would be much faster for the next reading step.

Now we can see some good reasons for their combination in usage.

1.       Accelerate both read and write.

2.       The important factor is, when we write something into memory by the ‘write back’ policy? The answer is: The time just before we need to read the contents in memory. Then, we are going to read the memory, so it is high time that we are eager to provide a read-hit cache block now! And the policy is exactly ‘write allocate’.

3.       Another fundamental factor is that, if we start with a write-miss and the policy is ‘write allocate’, this block is going to appear in caches. Thus, if another write command comes, ‘write back’ policy can easily work on caches and save time accessing memory.

 

Similarly, we can analyze the ‘write-through’ policy and its combination with ‘no write allocate’. ‘Write through’ provides a real-time-updated memory and it is unnecessary to fetch the address block into cache any more. It matches the policy ‘no write allocate’. 


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 1

    粉丝
  • 0

    好友
  • 0

    获赞
  • 2

    评论
  • 访问数

手机版| 小黑屋| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-5-25 15:29 , Processed in 0.086006 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部