- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Chapter 7Memory Management 有效的存储器管理在多道程序系统中是至关重要的。如果仅仅有一些进程在存储器中,那么大多数时候所有进程都在等待I/O,处理器也处于空闲状态。因此,存储器必须有效地分配,以便尽可能多的进程可以装入存储器中, 因为程序必须装入主存才能执行。 7.1 Memory Management Requirements(存储器管理需求 ) Relocation(重定位) Memory Protection(存储保护) Memory Sharing(存储共享) Logical Organization(逻辑组织) Physical Organization(物理组织) Relocation(重定位 ) 在多道程序系统中,可用的主存空间通常被许多进程共享, 因此存在以下情况: (1). Programmer does not know in advance where the program will be resident in memory when it is executed。(程序员不可能事先知道:在程序执行时,哪个程序会驻留在主存中。 ) 怎样实现寻址? 1. Logical reference to a memory location independent of the current assignment of data to memory(逻辑地址是指与当前数据在存储器中的分配情况无关的对存储器单元的访问.) 2. Relative address expressed as a location relative to some known point(相对地址被解释成相对于某些已知点的存储单元) 3. Physical the absolute address or actual location in main memory(物理地址或绝对地址是主存中的实际单元。 ) Protection(保护) Base register starting address for the process Bounds register ending location of the process These values are set when the process is loaded Programs in other Processes should not be able to reference memory locations in a process for reading or writing purposes without permission。(其他进程中的程序不能为未经授权的读或写访问这个进程的存储器单元 ) Note that,the memory protection requirement must be satisfied by the processor (hardware) rather than OS(software). This is because the operating system cannot anticipate all of the memory references that a program will make.(注意,存储器保护要求必须由处理器(硬件)来满足,而不是由操作系统(软件)满足。这是因为操作系统不能预测一个程序可能产生的所有存储器访问) Sharing(共享) Allow several processes to access the same portion of memory(允许多个进程访问主存的同一部分 ) Better to allow each process (person) access to the same copy of the program rather than have their own separate copy(允许每个进程访问该程序的同一个副本要优于让它们有自己单独的副本 ) Logical Organization(逻辑组织 ) 计算机系统中的主存总是被组织成线性的或一维的地址空间,此空间由一系列字节或字组成。辅存在物理层上也是按类似方式组织的。 这种方式叫文件的逻辑组织。 逻辑组织带来许多好处: Modules can be written and compiled independently( 可以独立地写或编译模块 )。 Physical Organization(物理组织 ) Computer memory is organized into at least two levels,
文档评论(0)