当前位置: 首页 > news >正文

计算机组成与设计-第五章 memory hierarchy(一)

5.1 Introduction

存储器访问是计算机中最常见的动作。我们希望有无限大的存储空间,并且访问速度很快,但这两者是矛盾的。通常来说,存储器越小,离CPU越近,访问速度会快;存储器越大,离 CPU越远,访问速度越慢。

Memory access有两个局部性(principle of locality):这里直接复制书中的内容

Temporal locality (locality in time): if an item is referenced, it will tend to be referenced again soon.

Spatial locality (locality in space): if an item is referenced, items whose

addresses are close by will tend to be referenced soon

时间局部性通常体现在循环中。

空间局部性的例子有顺序执行的程序,数组等块存储结构。

Cache既利用了空间局部性,也利用了时间局部性。空间局部性是cache中的每一个cache line包含一段地址相邻的数据;时间局部性,缓存在cache中的数据,下次被访问的时候,直接从cache中取。

根据局部性原则,引入了memory hierarchy,如下图

顶层的memory:容量小;速度快;价格贵;存储密度低

底层的memory:容量大;速度慢;价格低;存储密度高

顶层memory中的内容一定包含在底层memory中;通常数据的交换只会发生在相邻的两层memory之间。

hit rate The fraction of memory accesses found  in a level of the memory hierarchy.

miss rate The fraction of memory accesses not found in a level of the memory hierarchy.

hit time The time required to access a level of the memory hierarchy, including the time needed to determine whether the access is a hit or a miss.

miss penalty The time required to fetch a block into a level of the memory hierarchy from the lower level, including the time to access the block, transmit it from one level to the other, insert it in the level that experienced

the miss, and then pass the block to the requestor.

 

5.2 memory technology

SRAM (static  random access memory)

每bit由6-8个晶体管组成;读操作不会影响数据,不需要刷新;访问速度快;只要不掉电,数据就不会丢失。

DRAM(dynamic random access memory)

- the value kept in a cell is stored as a charge in a capacitor.

- A single transistor is then used to access this stored charge。 So one transistor per

bit of storage

- must periodically be refreshed

refresh方式:读出来,再写进去。

数据保持时间是几个ms,所以要每隔几个ms要做一次refresh。DDR颗粒可以是每个bank refresh,也可以所有bank一起refresh。

 

DDR SDRAM。

每个bank都有一个buffer。

Address interleaving:向多个bank发出地址,同时访问多个bank,带宽倍增。

参考:

1. 计算机组成与设计 第五版 ARM版

相关文章:

  • 软考高级系统架构设计师系列论文二:论软件的性能优化设计
  • 【CircuitPython】RaspberryPi Pico RP2040 自定义机械键盘实例
  • CentOS7.6安装Rabbitmq
  • 谁说文艺青年开花店必亏,我用3年时间挣了20万
  • 11种增加访问者在网站上平均停留时间的技巧
  • centos7.6 yum安装 elasticsearch
  • Android字母、数字版本、API级别对照表2022
  • 专利的分类
  • 删除链表的节点
  • Docker安装和基本配置
  • A40I工控主板(SBC-X40I)LED,铵键测试
  • 中国将从9月起实施严格的新跨境数据传输规则
  • 新唐NUC980使用记录:使用wpa_supplicant访问无线网络
  • 教师教室预约管理系统(SpringBoot,H-UI,Mysql)
  • Centos7五步安装Docker并解决docker官方镜像无法访问问题
  • [deviceone开发]-do_Webview的基本示例
  • 002-读书笔记-JavaScript高级程序设计 在HTML中使用JavaScript
  • axios请求、和返回数据拦截,统一请求报错提示_012
  • Effective Java 笔记(一)
  • extjs4学习之配置
  • gcc介绍及安装
  • HTTP中GET与POST的区别 99%的错误认识
  • JavaWeb(学习笔记二)
  • JDK9: 集成 Jshell 和 Maven 项目.
  • MyEclipse 8.0 GA 搭建 Struts2 + Spring2 + Hibernate3 (测试)
  • MySQL用户中的%到底包不包括localhost?
  • Spring Cloud Alibaba迁移指南(一):一行代码从 Hystrix 迁移到 Sentinel
  • Traffic-Sign Detection and Classification in the Wild 论文笔记
  • ViewService——一种保证客户端与服务端同步的方法
  • vue-cli3搭建项目
  • Yeoman_Bower_Grunt
  • 关于for循环的简单归纳
  • 排序算法学习笔记
  • 微信小程序上拉加载:onReachBottom详解+设置触发距离
  • 系统认识JavaScript正则表达式
  • 正则与JS中的正则
  • 数据库巡检项
  • ​​​​​​​ubuntu16.04 fastreid训练过程
  • #绘制圆心_R语言——绘制一个诚意满满的圆 祝你2021圆圆满满
  • #每日一题合集#牛客JZ23-JZ33
  • $.proxy和$.extend
  • (1/2)敏捷实践指南 Agile Practice Guide ([美] Project Management institute 著)
  • (C语言)二分查找 超详细
  • (Git) gitignore基础使用
  • (一)python发送HTTP 请求的两种方式(get和post )
  • (转)c++ std::pair 与 std::make
  • (转)JAVA中的堆栈
  • (转)Oracle存储过程编写经验和优化措施
  • .net wcf memory gates checking failed
  • .Net6使用WebSocket与前端进行通信
  • .pyc文件是什么?
  • /boot 内存空间不够
  • @SuppressWarnings注解
  • [ element-ui:table ] 设置table中某些行数据禁止被选中,通过selectable 定义方法解决
  • [1] 平面(Plane)图形的生成算法