Memoey Hierarchy
Contents
1存储器技术Memory Technology
存储技术之间的关系The relationship between memory technologies
存储器层次结构一般框架 A common Framework for Memory Hierarchy
SRAM
DRAM
闪存Flash
磁盘存储器Disk Storage
2.cache
基本原理和组织Fundamentals and Organization
性能优化Performance Optimizations
存储规则政策 Advanced Replacement Policies
缓存一致性Cache Coherence
Cache分块和矩阵算法 Going Faster: Cache Blocking and Matrix Multiply
3,虚存储器Virtual Memory
加快地址转换:TLB
4,RISC-V指令系统RISC-V instruction system
内存访问排序
控制状态寄存器访问
系统
5.DGEMM优化DGEMM optimization
结合cache分块和子字并行
1存储器技术Memory Technology
存储器层次结构一般框架 A common Framework for Memory Hierarchy

①寄存器是做在CPU中的。但是,寄存器不仅CPU有,I/O端口也有。这些寄存器还可以分为两类,体系结构寄存器(机器指令可以直接对这些寄存器进行操作)和非体系结构寄存器(机器指令不可以直接对这些寄存器进行操作)。
②缓存的一部分是做在CPU中的
③主存+寄存器+缓存时放在主机里的
④磁盘、光盘、磁带时放在辅助存储器中。
①The register is done in the CPU. However, not only CPUs have registers, but also I/O ports. These registers can also be divided into two categories, architectural registers (machine instructions can directly operate on these registers) and non-architectural registers (machine instructions cannot directly operate on these registers).
② Part of the cache is done in the CPU
③ Main memory + register + cache placed in the host
④ When disks, CDs, and magnetic tapes are used, they are placed in auxiliary storage.
SRAM
sram in cache
静态RAM基本电路的核心就是这个4根管子的双稳态触发器。两端(T1、T4)用于存储信息,一端就是触发器的原端,另一端就是触发器的非端。如果T1是1,那么T4就是0。如果T1是0,那么T4就是1。T5和T6用于控制对存储文件进行读还是写。当需要读写时,它们就连通。
The core of the basic circuit of static RAM is this 4-tube bistable flip-flop. Both ends (T1, T4) are used to store information, one end is the original end of the flip-flop, and the other end is the non-end of the flip-flop. If T1 is 1, then T4 is 0. If T1 is 0, then T4 is 1. T5 and T6 are used to control whether the storage file is read or written. When they need to read and write, they are connected.
在这项工作提出的设计中,有源RDBL在READ1期间放电,在READ-0期间保持高电平。电荷分担电容在读前放电,读取时PREDISLFT[2:0]被选择性地设置为低电平,当RDWL[n]在右区启动时,右侧扇区PREDISLFT[2:0]被选择性地设置为低电平。同时,基于直流控制位的CSHLFT_B[2:0]的组合也被设置为低电平,以拉动直流控制位。
控制位也被设置为低电平,以拉动RDBLLFT的电荷,并在高低电平之间建立一个参考电压。
在RDBLRGT的高电平和低电平之间建立一个参考电压。RDBL保持器不用于因为它们会干扰由电荷分担率设定的参考电平。
In the designs presented in this work, the active RDBL is discharged during READ1 and stays high during READ-0. Charge share capacitors are discharged before reads, and PREDISLFT[2:0] are selectively set low when RDWL[n] is fired in the right sector. At the same time a combination of CSHLFT_B[2:0] based on DC control bits is also set low to pull charge off of RDBLLFT and create a reference voltage in between the high and low levels of RDBLRGT.
RDBL keepers are not used in the CSSA design as they would interfere with the reference level set by the charge share ratio.
dram in main memory
dram内部组织图

闪存flash,基于EEPROM,固态硬盘(SSD)就是基于闪存的磁盘驱动器
Flash memory, based on EEPROM, solid-state drives (SSD) are flash-based disk drives
闪存的种类 Types of flash memory
NOR闪存:位单元类似或非门 NOR Flash: Bit cells are like NOR gates
随机读/写访问 random read/write access
在嵌入式系统用作指令存储器 Used as instruction memory in embedded systems
NAND闪存:位单元类似与非门 NAND Flash: Bit cells are like NAND gates
密度更大(单位面积的位数),但每次只能访问一个块 More dense (number of bits per unit area), but only one block can be accessed at a time
每GB更便宜 Cheaper per GB
用于U盘、媒体存储器等等 For USB sticks, media storage, etc.
闪存位在上千次访问后损坏 Flash bits corrupt after thousands of accesses
不适于直接代替RAM或磁盘 Not suitable for direct replacement of RAM or disk
损耗均衡:将数据重新映射到较少使用的块中 Wear Leveling: Remap data into less used blocks
Types of flash memory
NOR Flash: Bit cells are like NOR gates
random read/write access
Used as instruction memory in embedded systems
NAND Flash: Bit cells are like NAND gates
More dense (number of bits per unit area), but only one block can be accessed at a time
Cheaper per GB
For USB sticks, media storage, etc.
Flash bits corrupt after thousands of accesses
Not suitable for direct replacement of RAM or disk
Wear Leveling: Remap data into less used blocks
磁盘disk
磁盘存储器
利用巨磁电阻效应,非易失,转动的磁介质存储器
Nonvolatile, rotating magnetic media memory utilizing the giant magnetoresistance effect
硬盘的种类主要是SCSI 、IDE 、以及现在流行的SATA等;任何一种硬盘的生产都要一定的标准;随着相应的标准的升级,硬盘生产技术也在升级
The types of hard disks are mainly SCSI, IDE, and now popular SATA, etc. The production of any kind of hard disk requires a certain standard; with the upgrade of the corresponding standards, the production technology of hard disk is also upgraded
磁盘扇区及访问 Disk sectors and access
每个扇区记录有 Each sector is recorded with
扇区ID Sector ID
数据(标准规定了512字节、4096字节) Data (the standard specifies 512 bytes, 4096 bytes)
纠错码(ECC) Error Correcting Code (ECC)
用于隐藏缺陷与记录差错 Used to hide defects and record errors
同步字段和间隙 Sync fields and gaps
访问一个扇区涉及 Accessing a sector involves
如果其他访问正在等待,则有排队延时 If other accesses are waiting, there is a queuing delay
寻道:移动磁头 Seek: Move the head
旋转延时 rotation delay
数据传输 data transmission
控制器开销 Controller overhead
影响磁盘性能的因素
制造商标示平均寻道时间
基于所有寻道可能
局部性及操作系统调度使得平均寻道时间更短
智能磁盘控制器为磁盘分配物理扇区
为主机提供逻辑扇区接口
SCSI、ATA、SATA
磁盘驱动器内涵cache
预判断访问位置,预取扇区
避免寻道和旋转延时
