硬盘Cache写机制Write-through与Write-back的区别_第1页
硬盘Cache写机制Write-through与Write-back的区别_第2页
硬盘Cache写机制Write-through与Write-back的区别_第3页
硬盘Cache写机制Write-through与Write-back的区别_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Write-through- Write is done synchronously both to the cache and to the backing store.Write-back (or Write-behi nd) Writi ng is done on ly to the cache. A modified cache block is writte n back tothe store, just before it is replaced.Write-through(直写模式)在数据更新时,同时写入缓存Cache和后端存储。此模式的优点是操作简单;缺点是因为数据修改需要同

2、时写入存储,数据写入速度较慢。Write-back (回写模式)在数据更新时只写入缓存Cache。只在数据被替换出缓存时,被修改的缓存数据才会被写到后端存储。此模式的优点是数据写入速度快,因为不需要写存储;缺点是一旦更新后的数据未被 写入存储时出现系统掉电的情况,数据将无法找回。Write-misses写缺失的处理方式对于写操作,存在写入缓存缺失数据的情况,这时有两种处理方式:Write allocate (aka Fetch on write) Datum at the missed-write locati on is loaded to cache, followed by awrite

3、-hit operati on. In this approach, write misses are similar to read-misses.No-write allocate (aka Write-no-allocate. Write aro und) Datum at the missed-write locati on is noto cache, and is written directly to the backing store. In this approach, actually only system reads are being cached.Write all

4、ocate方式将写入位置读入缓存,然后采用write-hit (缓存命中写入)操作。写缺失操作与读缺失操作类似。No-write allocate方式并不将写入位置读入缓存,而是直接将数据写入存储。这种方式下,只有读操作会被 缓存。无论是Write-through 还是Write-back都可以使用写缺失的两种方式之一。只是通常Write-back采用Writeallocate方式,而 Write-through 采用No-write allocate方式;因为多次写入同一缓存时,Write allocate配合Write-back可以提升性能;而对于 Write-through 则没有帮助。处理流程图Write-through模式处理流程:2 脚本之寂A Write-Through cache with No-Write Alloca

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论