文档介绍:第七讲存储器管理
中国科学技术大学计算机系
陈香兰
******@ustc.
2013Fall
内容提要
存储器的层次结构
程序执行的基础知识、程序的装入和链接
连续分配存储管理方式
分页存储管理方式
分段存储管理
段页式存储管理
存储器的层次结构
存储器是计算机系统的重要组成部分
容量、价格和速度之间的矛盾
内存、外存;易失性和永久性
内存,是稀缺资源
在现代计算机系统中,存储通常采用层次结构来组织
多级存储器结构
主存与寄存器
高速缓存和磁盘缓存
多级存储器结构
Storage systems in puter system can anized in a hierarchy
Speed, access time
Cost per bit
Volatility
主存 vs. 寄存器
Same: Access directly for CPU
Register name
Memory address
Different: access speed
Register, one cycle of the CPU clock
Memory, Many cycles (2 or more)
Disadvantage:
CPU needs to stall frequently & this is intolerable
Remedy
Cache
高级缓冲技术caching
Caching
Copying information into faster storage system
When accessing, first check in the cache, if
In: use it directly
Not in: get from upper storage system, and leave a copy in the cache
Using of caching
Registers provide a high-speed cache for main memory
Instruction cache & data cache
Main memory can be viewed as a fast cache for secondary storage
……
ic disks 磁盘
Transfer time 传输时间
TT≈ data size * Transfer rate
Transfer rate ≈(n M/s)-1 ≈( n Byte/us )-1 ≈ 1/n us/Byte
Positioning time 定位时间
Seek time 寻道
Ts
Rotational latency 旋转延迟
TR
TP ≈ Ts +TR ≈ m ms
TT VS. TP
Please Store data closely
程序执行的基础知识
Von Neumann architecture 冯·诺依曼体系结构(图)
Program must be brought into memory
Main memory is usually too small
Process
Program must be placed within a process for it to be executed
作业池
User programs
Where to place the program
several steps(图)