7存储器管理答题.ppt

  1. 1、本文档共57页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
对换与覆盖 对换与覆盖 Keep in memory only those instructions and data that are needed at any given time. Needed when process is larger than amount of memory allocated to it. Implemented by user, no special support needed from operating system, programming design of overlay structure is complex 分页存储管理 Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter is available. Divide physical memory into fixed-sized blocks called frames (size is power of 2, between 512 bytes and 8192 bytes). Divide logical memory into blocks of same size called pages. 分页存储管理 Keep track of all free frames. To run a program of size n pages, need to find n free frames and load program. Set up a page table to translate logical to physical addresses. Internal fragmentation. 分页存储管理 page frame 分页存储管理 地址结构 页表 建立page与frame的对应关系 其它控制信息 页号p 偏移 31 12 11 0 分页存储管理 地址变换 分页存储管理 具快表(TLB)地址变换 分页存储管理 具快表(TLB)地址变换 Effective Access Time (EAT) EAT = h*t1 + (1-h)t2 其中 h为命中率 t1为页表在TLB中的访问时间(访问TLB时间+1次访问内存的时间) t2为不命中时访问时间(1次访问TLB时间+2次访问内存时间) 分页存储管理 例 检索TLB时间为20ns,访问内存时间100ns 则t1=120ns,t2=220ns H EAT 0 220 170 140 130 98 122 分页存储管理 两级页表 地址结构 分页存储管理 两级页表 分页存储管理 两级页表 分页存储管理 反置页表 One entry for each real page of memory. Entry consists of the virtual address of the page stored in that real memory location, with information about the process that owns that page. 分页存储管理 反置页表 Decreases memory needed to store each page table, but increases time needed to search the table when a page reference occurs. Use hash table to limit the search to one — or at most a few — table entries. 分页存储管理 反置页表 分段存储管理 为何分段存储管理 方便编程 分段共享 分段保护 动态链接 动态增长 分段存储管理 1 3 2 4 1 4 2 3 user space physical memory space 分段存储管理 地址结构 段号 + 段内地址 段表 建立逻辑段与物理地址的对应关系 分段存储管理 地址变换 分段存储管理 分段与分页的区别 页为信息的物理单位,段为逻辑单位 分页是有效利用存储器的需要,分段主要是用户的

文档评论(0)

希望之星 + 关注
实名认证
内容提供者

我是一名原创力文库的爱好者!从事自由职业!

1亿VIP精品文档

相关文档