欢迎来到天天文库
浏览记录
ID:55648713
大小:1.92 MB
页数:67页
时间:2020-05-22
《操作系统教学课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在PPT专区-天天文库。
1、Chapter9VirtualMemoryOperatingSystemConceptsChapter9:VirtualMemoryBackgroundDemandPagingProcessCreation(Copy-on-Write)PageReplacementAllocationofFramesThrashingMemory-MappedFilesOtherConsiderations2ObjectivesTodescribethebenefitsofavirtualmemorysystemToexplaintheconceptsofd
2、emandpaging,page-replacementalgorithms,andallocationofpageframesTodiscusstheprincipleoftheworking-setmodel39.1BackgroundAllmemorymanagementschemesattempttohavemanyprocessesinmemoryatthesametimetosupportahighdegreeofmultiprogramming.Virtualmemory–separationofuserlogicalmemor
3、yfromphysicalmemory.Virtualmemorycanbeimplementedvia:DemandpagingDemandsegmentation49.1BackgroundVirtualmemory–isatechniquethatdoesnotrequiretheentirelogicaladdressspacetobeinmemoryforexecution.Onlypartoftheprogramneedstobeinmemoryforexecution.Additionalpartsoftheaddressspa
4、cearebroughtinasneeded.Logicaladdressspacecanthereforebemuchlargerthanphysicaladdressspace.Thisalsoallowssomeorganizationsofaprocess’saddressspacetobesharedbyotherprocesses.Thiscertainlyallowsformoreefficientprocesscreation,astheentireaddressspacedoesnotneedtobebroughtintop
5、rimarymemoryinthebeginningofexecution.5VirtualMemoryThatisLargerThanPhysicalMemorySomebasicrequirementsstillhold:Instructionstobeexecutedmustbeinphysicalmemory.Unfortunately,thislimitsthesizeofaprogramtothesizeofmemory.Intruth,oftentimesmajorpartsofprogramsareneverexecutedf
6、oragiven‘run.’6VirtualMemoryThatisLargerThanPhysicalMemorySo,theabilitytoexecuteaprogramonlypartiallyinmemoryisagreatstepforward.Programmersmaynowwriteprogramsnotconstrainedbymemorysize.Theymaythusconcentrateontheproblemthey’resolvingratherthanbylimitationsofthecomputingsys
7、tem.Moreso,manyprogramsmaybemorereadily(容易地)runatthesametimebecauseentireprogramsneednotbephysicallyinmemoryatthesametime.7VirtualMemoryThatisLargerThanPhysicalMemory(P316)Considerthisfigure:Wecanseethatonlypartsofaprogramresideinphysicalmemoryatanygivensnapshotintime.Othe
8、r‘parts’ofaprogrammayresideondiskuntil(andif)needed.Clearly,thepagesarenotcontiguo
此文档下载收益归作者所有