PC_存储器分类_存储器性能指标_ROM

文章目录

  • 存储器分类
      • 作用(层次)分类
      • 存储介质
      • 存取方式分类的存储器
        • 随机访问
      • ref
        • 不可随机访问
      • 信息留存性
      • 破坏性读出
    • ROM
      • ROM类型
  • 存储器的性能
      • 存储容量
      • 单位成本
      • 存储速度(传输速率)
        • 存取时间(memoryAccessTime)
        • 存取周期(memeroyCycleTime)
      • 存储器带宽(memory bandwidth)
    • 多级分层次的存储系统
      • cache-主存层
      • 主存-辅存层
        • 虚拟存储系统
      • 副本
    • cpu访存
  • 附:rom
      • What Does Read Only Memory Do? Function of ROM
      • What Are The Types of ROM?

存储器分类

作用(层次)分类

  • 主存储器(内存):
    • 存放计算机 运 行 期 间 运行期间 所需要的 程 序 和 数 据 程序和数据
    • cpu可以直接访问内存
    • 内存可以和Cache以及辅助存储器交换数据
    • 特点是:
      • 容量小
      • 存取速度快
      • 每位价格较高
  • 辅助存储器
  • 高速缓冲存储器(cache)
    • 位于主存和cpu之间(现代计算机将cache制作在cpu中)
    • 用来存放当前的cpu经常使用的 指 令 和 数 据 指令和数据
    • Cache的存取速度和cpu相匹配
    • 但是容量小,价格高

存储介质

  • 磁表面存储器
    • 磁盘
    • 磁带
  • 磁芯存储器
  • 半导体存储器
    • MOS型存储器
    • 双极型存储器
  • 光存储器(光盘)

存取方式分类的存储器

随机访问

  • 随机存储器(RAM)
    • RAM的任意一个单元都可以随机存取
    • 存取时间和物理位置无关
    • 读写方便灵活,主要用作主存和cache
    • RAM可以进一步分为:
      • SRAM
      • DRAM
  • 只读存储器(ROM)
    • ROM的内容只能够随机读取而不能够写
    • 信息一旦写入ROM,就固定不变,即使断电,也不会丢失
      • 这点与DRAM也是不同的,它不需要定时刷新操作就能够保持数据
      • 甚至不SRAM更加稳定,(断点后还是不会丢失数据)
    • 通常用来存放固定不变的
      • 程序
      • 常数
      • 字库
      • 可以和RAM共同作为主存的一部分(统一构成主存的地址域)
    • ROM的派生存储器也包含可重写的类型
      • 广义上的只读存取器可以通过电擦除等方式进行重写
        • 但是仍然具有断点保留内容,随机读取的特性
        • 写入速度比读取速度慢的多
      • ROM和RAM都是随机存取类型

ref

  • Read-only memory - Wikipedia

  • Read-only memory (ROM) is a type of non-volatile memory

    • (非易失性存储:Non-volatile memory (NVM) or non-volatile storage is a type of computer memory that can retain stored information even after power is removed. In contrast, volatile memory needs constant power in order to retain data.)
  • used in computers and other electronic devices. Data stored in ROM cannot be electronically modified after the manufacture(制造) of the memory device.

  • Read-only memory is useful for storing software that is rarely changed during the life of the system, also known as firmware.

    • ROM存储器用来保存很少变动的软件/数据(也就是固件)
  • Software applications (like video games) for programmable devices can be distributed as plug-in cartridges containing ROM.

    • 可编程设备的软件应用程序(如视频游戏)可以作为包含ROM(硬件)的插件盒分发
  • Strictly speaking, read-only memory refers to memory that is hard-wired, such as diode matrix or a mask ROM integrated circuit (IC), which cannot be electronically[a] changed after manufacture.

    • 严格地说,只读存储器是指硬接线的存储器,例如二极管矩阵或掩模ROM集成电路(IC),在制造后不能进行电子更改。
  • Although discrete circuits can be altered in principle, through the addition of bodge wires and/or the removal or replacement of components, ICs cannot.

    • 尽管分立电路原则上可以通过增加屏蔽线和/或移除或更换元件来改变,但IC不能改变。
  • Correction of errors, or updates to the software, require new devices to be manufactured and to replace the installed device.

    • 纠正错误或更新软件需要制造新设备并更换已安装的设备。
  • Floating-gate ROM semiconductor memory in the form of erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) and flash memory can be erased and re-programmed.

  • But usually, this can only be done at relatively slow speeds, may require special equipment to achieve, and is typically only possible a certain number of times.[1]

  • 可擦除可编程只读存储器(EPROM)、电可擦除可编程序只读存储器(EEPROM)和闪存形式的浮栅ROM半导体存储器可以被擦除和重新编程。

  • 但通常,这只能在相对较慢的速度下进行,可能需要特殊设备才能实现,并且通常只能进行一定次数

  • The term “ROM” is sometimes used to mean a ROM device containing specific software, or a file with software to be stored in EEPROM or Flash Memory.

    • For example, users modifying or replacing the Android operating system describe files containing a modified or replacement operating system as “custom ROMs” after the type of storage the file used to be written to.
    • 术语“ROM”有时用于表示包含特定软件的ROM设备,或包含(要存储在EEPROM或闪存中的)软件的文件(比如压缩包文件)。
    • 例如
      • 修改或替换Android操作系统的用户将包含修改或替换操作系统的文件描述为“自定义ROM”,即文件用于写入的存储类型

不可随机访问

  • 串行访问存储器
    • 存储单元的访问,需要其按照物理位置的先后顺序寻址
      • 顺序存取存储器(SAM)
        • 磁带
      • 直接存取存储器(DAM)
        • 其中,直接存取存储器是介于顺序存取存储器和随机存储器之间的一种存储器
          • 先在整个存储器中找到目标单元所在的个小区域(比如磁盘磁道)
          • 再在区域中顺序查找
        • 例如:
          • 磁盘
          • 光盘(CD-ROM:Compact Disc Read-Only Memory)

信息留存性

  • 断电后数据消失的存储器是易失性存储器
    • RAM
  • 断电后数据仍然保持的存储器,称为非易失性存储器
    • ROM
    • 磁表面存储器
    • 光存储器

破坏性读出

  • 如果某个存储单元的信息被读取后,原存储信息被破坏,称为破坏性读出
    • 否则为非破坏性读出
  • 具有破坏性读出特性的存储器,在读取操作后需要紧接着一个再生操作(恢复被破坏的信息)

ROM

  • ROM和RAM都是可以随机存取的存储器
  • ROM结构简单,具有更高的位密度
  • 具有非易失性,可靠性较高

ROM类型

  • 掩模式只读存储器MROM
    • 写入内容后无法改变
    • 由半导体制造商更加客户要求写入
  • 一次可编程只读存储器PROM
    • 可以一次性编程
    • 用写入设备写入一次后,内容无法改变
    • 由用户用专门的设备写入
  • 可擦除可编程只读存储器EPROM
    • 这里的只读已经不是真的只读
    • EPROM即可读又可写
      • 但是写的次数和写入速度不如RAM
  • Flash存储器
    • 在EPROM和EEPROM( E 2 P R O M E^2PROM E2PROM)的基础上发展而来
    • 用MOS管的浮栅上有无电荷来存储信息
    • 闪存依然是rom的一种,写入数据前必须擦除原有数据,写入1速度慢于读取速度
    • Flash价格便宜,集成度高,擦除重写速度快
  • 固态硬盘SSD
    • 固态电子存储芯片阵列制成的硬盘
    • 由控制单元和存储单元(Flash芯片)组成
    • 具有长期保存信息,快速擦除与重写的特性
    • 速度快,功耗低
    • 价格高

存储器的性能

  • 有三个性能指标,它们相互制约
    • 设计存储系统追求:
      • 大容量
      • 低成本
      • 高速度

存储容量

  • 容 量 = 存 储 字 数 × 字 长 容量=存储字数\times{字长} =×

单位成本

  • 每 位 ( b i t ) 价 格 = 总 成 本 总 容 量 每位(bit)价格=\frac{总成本}{总容量} (bit)=

存储速度(传输速率)

  • 设:

    • 数据的宽度为S
    • 存储周期为为T
  • 传 输 速 率 v = S T 传输速率v=\frac{S}{T} v=TS

    • 注意单位的统一
    • 通常数据是2的幂,将其转换为2的方幂形式进行计算
    • 注意单位统一,通常将宽度化为字节数,周期化为秒

存取时间(memoryAccessTime)

  • 存取时间: T a T_a Ta(memory access time)
    • 启动一次存储器操作到完成该操作所经历的时间
      • 读出时间
      • 写入时间

存取周期(memeroyCycleTime)

  • 存取周期(读写周期/访问周期): T m T_m Tm
    • 存储器进行一次完整的读写操作所需要的全部时间
    • 连续两次独立访问存储器操作之间所需要的最小时间间隔
      • 两次访存时间点分别记为 t 1 , t 2 t_1,t_2 t1,t2
      • 间隔 T m = t 2 − t 1 T_m=t_2-t_1 Tm=t2t1
    • 通常,存取周期大于存取时间,(考虑到前一次存取完需要恢复时间,以便下一次存取)
      • 用存取周期来衡量存取速度比较准确
      • 例如,破坏性读出,恢复时间和存取时间一样长( T m = 2 T a T_m=2T_a Tm=2Ta)

存储器带宽(memory bandwidth)

  • 主存带宽(数据传输率) B m B_m Bm:
    • 与存取周期密切相关的指标就是存储器带宽
    • 表示每单位时间内存储器存取的信息量
      • 或者说,每秒从主存进出信息的最大数量
      • 存储器带宽决定了以存储器为中心的机器获取信息的速度,是改善机器性能瓶颈的关键因素
    • 单位:
      • 字/s(Word/s)
      • Byte/s(B/s)
      • bit/s(b/s)

  • 存取周期为500ns;每个周期访问16bit数据

  • 那么其带宽为:

    • B = 16 b i t / 500 n s = 16 b i t / ( 500 × 1 0 − 9 s ) = 16 500 × 1 0 9 b i t / s = 3.2 × 1 0 7 b i t / s = 32 M b i t / s B=16bit/500ns=16bit/(500\times{10^{-9}}s)=\frac{16}{500}\times{10^9}bit/s \\=3.2\times{10^7}bit/s=32Mbit/s B=16bit/500ns=16bit/(500×109s)=50016×109bit/s=3.2×107bit/s=32Mbit/s

多级分层次的存储系统

  • 为实现一下的特点,引入多级分层次存储系统
    • 高速度
    • 大容量
  • 主要思想是:利用上一层的存储器作为第一层存储器的高速缓存

cache-主存层

  • 解决cpu和内存速度不匹配问题

主存-辅存层

  • 解决存储系统容量的问题

虚拟存储系统

  • 在主存-辅存层的发展中,形成了虚拟存储系统(Virtual storage system)
    • 在Vss中,程序员编址的地址范围和虚拟存储器的空间地址相对应
    • 对于具有Vss的计算机系统而言,编程是可以用的地址空间远远大于主存空间
    • 详见(操作系统部分)

副本

  • cache-主存层和主存-辅存层,上一层的内容都是下一层内容的副本
    • cache保存主存数据副本
    • 主存保存辅存数据副本
  • 这主要和buffer(缓冲)相区别

cpu访存

  • cpu可以和内存以及cache直接交换信息
  • cpu通过内存间接和辅存交换信息
  • 主存和下面三种部件都能够直接交换信息
    • cpu
    • cache
    • 辅存
  • 主存和cache之间的数据调动是硬件自动完成的,对所有程序员都是透明的(不可见的)
  • 主存和辅存之间的数据调动则是硬件和操作系统共同完成,对应用级程序员是透明的

附:rom

  • What is Read Only Memory (ROM)? Types of ROM Defined
    • Read-Only Memory (ROM), is a type of electronic storage that comes built in to a device during manufacturing. You’ll find ROM chips in computers and many other types of electronic products; VCRs, game consoles, and car radios all use ROM to complete their functions smoothly. ROM chips come built into an external unit – like flash drives and other auxiliary memory devices – or installed into the device’s hardware on a removable chip. Non-volatile memory like ROM remains viable even without a power supply.

What Does Read Only Memory Do? Function of ROM

ROM stores “firmware,” which is permanent software that’s hard-wired with integrated circuits. The manufacturer fits a specifically designed ROM chip into a device during the building process.

Unlike the non-volatile memory of a hard drive, it’s difficult and time-consuming to rewrite a ROM chip’s memory. In most cases, it’s impossible to alter integrated circuits, which may mean you can’t update more basic forms of read only memory. You may be able to reprogram some modern types of ROM, but only at slow speeds and with special equipment. These hurdles make traditional ROM poorly suited for functions that require frequent feature updates or are prone to bugs or security issues.

Conventional ROM is pre-programmed to suit its intended hardware. It often controls functions that are both integral to the utility of the device and unlikely to need modification or personalization. One kind of data usually stored in a read only memory chip is the Basic Input-Output System (BIOS). A device’s BIOS controls the way the device responds to cues from the user at the most fundamental level, such as a computer’s “booting-up” process that occurs when the system powers on.

What Are The Types of ROM?

Here’s an overview of the different types of ROM, ranging from the most basic to more versatile.

ROM: Classic or “mask-programmed” ROM chips contain integrated circuits. A ROM chip sends a current through a specific input-output pathway determined by the location of fuses among the rows and columns on the chip. The current can only travel along a fuse-enabled pathway and thus can only return via the output the manufacturer chooses. Rewiring is functionally impossible, and so there’s no way to modify these types of ROM chips. While producing a template for an original ROM chip is laborious, chips made according to an existing template can be much more affordable.

PROM: Programmable ROM, or PROM, is essentially a blank version of ROM that you can purchase and program once with the help of a special tool called a programmer. A blank PROM chip allows current to run through all possible pathways; the programmer chooses a pathway for the current by sending a high voltage through the unwanted fuses to “burn” them out. Static electricity can create the same effect by accident, so PROMs are more vulnerable to damage than conventional ROMs.

EPROM: Erasable Programmable ROM chips allow you to write and rewrite them many times. These chips feature a quartz window through which a specialized EPROM programmer emits a specific frequency of ultraviolet light. This light burns out all the tiny charges in the EPROM to reopen its circuits. This exposure effectively renders the chip blank again, after which you can reprogram it according to the same process as a PROM. EPROM chips will eventually wear out, but they frequently have lifetimes of over 1000 erasures.

EEPROM: To modify an Electrically Erasable Programmable ROM chip, apply localized electrical fields to erase and rewrite the data. EEPROMs have several advantages over other types of ROM. Unlike the earlier forms, you can rewrite EEPROM without dedicated equipment, without removing it from the hardware, and in specifically designated increments. You don’t have to erase and rewrite everything to make a single edit.

Arrow.com is an authorized distributor of new and popular memory chips from top industry manufacturers. Explore our wide selection of products today.

你可能感兴趣的:(PC_存储器分类_存储器性能指标_ROM)