欢迎来到天天文库
浏览记录
ID:43515652
大小:935.90 KB
页数:149页
时间:2019-10-09
《lecture_13_virtual memory》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、VirtualMemoryZhaoFangOperatingSystems-forthecollagestudentsGoalforTodayBackgroundDemandPagingPageReplacementPoliciesPageAllocationPoliciesWorkingSet/ThrashingUNIXandSolarisMemoryManagementLinuxMemoryManagementWindowsMemoryManagementMemoryManageme
2、ntModernprogramsrequirealotofphysicalmemoryMemorypersystemgrowingfasterthan25%-30%/yearButtheydon’tusealltheirmemoryallofthetime90-10rule:programsspend90%oftheirtimein10%oftheircodeWastefultorequireallofuser’scodetobeinmemoryTheneedformainmemorySol
3、ution:usemainmemoryascachefordiskProcessorControlCachingTertiarySecondMainSecondaryStorageOnLevelMemoryStorage(Tape)Cache-ChipCache(DRAM)(Disk)Datapath(SRAM)IllusionofInfiniteMemoryTLBPageTablePhysicalDiskMemory500GBVirtual512MBMemory4GBKeypointsinMemor
4、yManagement1)MemoryreferencesarelogicaladdressesdynamicallytranslatedintophysicaladdressesatruntimeAprocessmaybeswappedinandoutofmainmemoryoccupyingdifferentregionsatdifferenttimesduringexecution2)Aprocessmaybebrokenupintopiecesthatdonotneedtolocatedcon
5、tiguouslyinmainmemoryBreakthroughinMemoryManagementIfbothofthosetwocharacteristicsarepresent,thenitisnotnecessarythatallofthepagesorallofthesegmentsofaprocessbeinmainmemoryduringexecution.Ifthenextinstruction,andthenextdatalocationareinmemorythenexecu
6、tioncanproceedatleastforatimeExecutionofaProcessOperatingsystembringsintomainmemoryafewpiecesoftheprogramResidentset-portionofprocessthatisinmainmemoryAninterruptisgeneratedwhenanaddressisneededthatisnotinmainmemoryOperatingsystemplacestheprocessina
7、blockingstateExecutionofaProcessPieceofprocessthatcontainsthelogicaladdressisbroughtintomainmemoryOperatingsystemissuesadiskI/OReadrequestAnotherprocessisdispatchedtorunwhilethediskI/OtakesplaceAninterruptisissuedwhendiskI/Ocompletewhichcausestheoper
8、atingsystemtoplacetheaffectedprocessintheReadystateImplicationsofthisnewstrategyMoreprocessesmaybemaintainedinmainmemoryOnlyloadinsomeofthepiecesofeachprocessWithsomanyprocessesinmainmemory,itisverylikelyaprocesswillbei
此文档下载收益归作者所有