当前位置: 首页 > 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官方镜像无法访问问题
  • 【159天】尚学堂高琪Java300集视频精华笔记(128)
  • 【EOS】Cleos基础
  • k个最大的数及变种小结
  • Lsb图片隐写
  • OSS Web直传 (文件图片)
  • passportjs 源码分析
  • Python连接Oracle
  • Shadow DOM 内部构造及如何构建独立组件
  • SQLServer之创建显式事务
  • vue 配置sass、scss全局变量
  • 读懂package.json -- 依赖管理
  • 更好理解的面向对象的Javascript 1 —— 动态类型和多态
  • 前端工程化(Gulp、Webpack)-webpack
  • 容器化应用: 在阿里云搭建多节点 Openshift 集群
  • 使用 Xcode 的 Target 区分开发和生产环境
  • 腾讯视频格式如何转换成mp4 将下载的qlv文件转换成mp4的方法
  • 吴恩达Deep Learning课程练习题参考答案——R语言版
  • 用Canvas画一棵二叉树
  • 找一份好的前端工作,起点很重要
  • ​LeetCode解法汇总518. 零钱兑换 II
  • ​探讨元宇宙和VR虚拟现实之间的区别​
  • #!/usr/bin/python与#!/usr/bin/env python的区别
  • ###C语言程序设计-----C语言学习(6)#
  • #{} 和 ${}区别
  • #etcd#安装时出错
  • (52)只出现一次的数字III
  • (NO.00004)iOS实现打砖块游戏(十二):伸缩自如,我是如意金箍棒(上)!
  • (二)pulsar安装在独立的docker中,python测试
  • (附源码)计算机毕业设计SSM在线影视购票系统
  • (数据大屏)(Hadoop)基于SSM框架的学院校友管理系统的设计与实现+文档
  • ****Linux下Mysql的安装和配置
  • .NET Core跨平台微服务学习资源
  • .NET Framework 服务实现监控可观测性最佳实践
  • .NET MAUI Sqlite程序应用-数据库配置(一)
  • .NET Micro Framework 4.2 beta 源码探析
  • 。Net下Windows服务程序开发疑惑
  • /etc/shadow字段详解
  • @Autowired和@Resource装配
  • @EnableConfigurationProperties注解使用
  • @开发者,一文搞懂什么是 C# 计时器!