8虚拟存储器.ppt

8虚拟存储器.ppt

ID:48061979

大小:1.27 MB

页数:51页

时间:2020-01-13

8虚拟存储器.ppt_第1页
8虚拟存储器.ppt_第2页
8虚拟存储器.ppt_第3页
8虚拟存储器.ppt_第4页
8虚拟存储器.ppt_第5页
资源描述:

《8虚拟存储器.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、Chapter8:VirtualMemory基本概念局部性原理定义请求分页存储管理方式MMU支持页面分配调入策略页面置换算法性能分析抖动Chapter8:VirtualMemory请求分段存储管理Intel80386存储管理方式Background局部性原理在某个时间间隔内,程序的执行时访问的地址空间局限在某个范围定义把作业的一部分装入内存便可运行的存储器系统具请求调入功能和置换功能,能在逻辑上对内存容量进行扩充的存储器系统Background虚拟存储器实现方式请求分页请求分段虚拟存储器特征离散性多次性对换性虚拟性DemandPagingBr

2、ingapageintomemoryonlywhenitisneeded.LessI/OneededLessmemoryneededFasterresponseMoreusersDemandPaging硬件支持(MMU)页表支持页号物理块号状态位访问字段修改位外存地址缺页中断机构地址变换机构地址变换过程硬件操作软件操作页面分配最小物理块数页面分配和置换策略固定分配局部置换可变分配全局置换可变分配局部置换分配算法平均分配按比例分配考虑优先权的分配算法页面调入策略何时调入页面预调页策略请求调页策略从何处调入页面交换区文件区混合页面置换算法最佳置换

3、算法先进先出置换算法LRU置换算法Clock置换算法最少使用置换算法页面缓冲算法Page-ReplacementAlgorithmsWantlowestpage-faultrate.Evaluatealgorithmbyrunningitonaparticularstringofmemoryreferences(referencestring)andcomputingthenumberofpagefaultsonthatstring.Inallourexamples,thereferencestringis1,2,3,4,1,2,5,1,2,

4、3,4,5.First-In-First-Out(FIFO)AlgorithmReferencestring:1,2,3,4,1,2,5,1,2,3,4,53frames(3pagescanbeinmemoryatatimeperprocess)4framesFIFOReplacement–Belady’sAnomalymoreframeslesspagefaults1231234125349pagefaults10pagefaults12312351245443OptimalAlgorithmReplacepagethatwillnotb

5、eusedforlongestperiodoftime.4framesexample6pagefaults123445OptimalAlgorithm1,2,3,4,1,2,5,1,2,3,4,5Howdoyouknowthis?Usedformeasuringhowwellyouralgorithmperforms.6pagefaults123445LeastRecentlyUsed(LRU)AlgorithmReferencestring:1,2,3,4,1,2,5,1,2,3,4,512354435LeastRecentlyUsed(L

6、RU)AlgorithmCounterimplementationEverypageentryhasacounter;everytimepageisreferencedthroughthisentry,copytheclockintothecounter.Whenapageneedstobechanged,lookatthecounterstodeterminewhicharetochange.LRUAlgorithm(Cont.)Stackimplementation–keepastackofpagenumbersinadoublelink

7、form:Pagereferenced:moveittothetoprequires6pointerstobechangedNosearchforreplacementLRUApproximationAlgorithmsReferencebitWitheachpageassociateabit,initially-=0Whenpageisreferencedbitsetto1.Replacetheonewhichis0(ifoneexists).Wedonotknowtheorder,however.LRUApproximationAlgor

8、ithmsSecondchanceNeedreferencebit.Clockreplacement.Ifpagetobereplaced(inclockorder

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。