欢迎登陆真网站,您的到来是我们的荣幸。 登陆 注册 忘记密码? ☆设为首页 △加入收藏
欢迎加入真幸福QQ群
电脑知识: 基础知识 网络技术 操作系统 办公软件 电脑维修 电脑安全 windows7 windows8 windows10 服务器教程 平板电脑 视频播放教程 网络应用 互联网 工具软件 浏览器教程 QQ技巧 输入法教程 影视制作 YY教程 wps教程 word教程 Excel教程 PowerPoint
云南西双版纳特产小花糯玉米真空包装


Win8/Win7下摄像头显示有波纹解决方法
汇总Win7旗舰版系统中启动服务界面的技巧
怎么查看新浪微博在线状态
Windows XP的六大忌讳
如何神不知鬼不觉的换Windows XP用户密码
如何修复丢失的BOOT.ini文件
不用任何工具实现两台笔记本的资源共享
为什么移动硬盘在自己的电脑上不能删除文件了
xp系统下载文件没有出现下载对话框
如何解决玩游戏提示显卡驱动版本过低问题
硬盘Cache写机制 Write-through与Write-back的区别
【 来源:网络 】【 点击:1 】 【 发布时间:2017_03_03 08:59:59 】

  Write-through- Write is done synchronously both to the cache and to the backing store.

  Write-back (or Write-behind) – Writing is done only to the cache. A modified cache block is written back to the store, just before it is replaced.

  Write-through(直写模式)在数据更新时,同时写入缓存Cache和后端存储。此模式的优点是操作简单;缺点是因为数据修改需要同时写入存储,数据写入速度较慢。

  Write-back(回写模式)在数据更新时只写入缓存Cache。只在数据被替换出缓存时,被修改的缓存数据才会被写到后端存储。此模式的优点是数据写入速度快,因为不需要写存储;缺点是一旦更新后的数据未被写入存储时出现系统掉电的情况,数据将无法找回。

  Write-misses写缺失的处理方式

  对于写操作,存在写入缓存缺失数据的情况,这时有两种处理方式:

  Write allocate (aka Fetch on write) – Datum at the missed-write location is loaded to cache, followed by a write-hit operation. In this approach, write misses are similar to read-misses.

  No-write allocate (aka Write-no-allocate, Write around) – Datum at the missed-write location is not loaded to cache, and is written directly to the backing store. In this approach, actually only system reads are being cached.

  Write allocate方式将写入位置读入缓存,然后采用write-hit(缓存命中写入)操作。写缺失操作与读缺失操作类似。

  No-write allocate方式并不将写入位置读入缓存,而是直接将数据写入存储。这种方式下,只有读操作会被缓存。

  无论是Write-through还是Write-back都可以使用写缺失的两种方式之一。只是通常Write-back采用Write allocate方式,而Write-through采用No-write allocate方式;因为多次写入同一缓存时,Write allocate配合Write-back可以提升性能;而对于Write-through则没有帮助。

  处理流程图

  Write-through模式处理流程:

硬盘Cache写机制 Write-through与Write-back的区别 三联

  A Write-Through cache with No-Write Allocation

  Write-back模式处理流程:

  A Write-Back cache with Write Allocation

本网站由川南居提供技术支持,fkzxf版权所有 浙ICP备12031891号
淳安分站 淳安分站