当前位置: 首页 > 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官方镜像无法访问问题
  • 8年软件测试工程师感悟——写给还在迷茫中的朋友
  • Angular 2 DI - IoC DI - 1
  • Angular4 模板式表单用法以及验证
  • Django 博客开发教程 8 - 博客文章详情页
  • Java多线程(4):使用线程池执行定时任务
  • Java反射-动态类加载和重新加载
  • java正则表式的使用
  • Laravel 中的一个后期静态绑定
  • mysql常用命令汇总
  • Netty+SpringBoot+FastDFS+Html5实现聊天App(六)
  • Python打包系统简单入门
  • rabbitmq延迟消息示例
  • Sequelize 中文文档 v4 - Getting started - 入门
  • spring security oauth2 password授权模式
  • Spring Security中异常上抛机制及对于转型处理的一些感悟
  • Vue小说阅读器(仿追书神器)
  • Webpack 4 学习01(基础配置)
  • 阿里中间件开源组件:Sentinel 0.2.0正式发布
  • 持续集成与持续部署宝典Part 2:创建持续集成流水线
  • 分布式任务队列Celery
  • 漫谈开发设计中的一些“原则”及“设计哲学”
  • 微信开源mars源码分析1—上层samples分析
  • 小程序上传图片到七牛云(支持多张上传,预览,删除)
  • 延迟脚本的方式
  • 原生Ajax
  • 追踪解析 FutureTask 源码
  • postgresql行列转换函数
  • 整理一些计算机基础知识!
  • ​LeetCode解法汇总2304. 网格中的最小路径代价
  • ​七周四次课(5月9日)iptables filter表案例、iptables nat表应用
  • ​一帧图像的Android之旅 :应用的首个绘制请求
  • #NOIP 2014# day.1 T3 飞扬的小鸟 bird
  • #pragma data_seg 共享数据区(转)
  • #我与虚拟机的故事#连载20:周志明虚拟机第 3 版:到底值不值得买?
  • (01)ORB-SLAM2源码无死角解析-(56) 闭环线程→计算Sim3:理论推导(1)求解s,t
  • (173)FPGA约束:单周期时序分析或默认时序分析
  • (done) ROC曲线 和 AUC值 分别是什么?
  • (八十八)VFL语言初步 - 实现布局
  • (淘宝无限适配)手机端rem布局详解(转载非原创)
  • (转)创业的注意事项