欢迎来到天天文库
浏览记录
ID:40084988
大小:1.76 MB
页数:27页
时间:2019-07-20
《Memory Management》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、Chapter9:MemoryManagementBackgroundSwappingContiguousAllocationPagingSegmentationSegmentationwithPagingOperatingSystemConcepts9.1Silberschatz,GalvinandGagne2002BackgroundProgrammustbebroughtintomemoryandplacedwithinaprocessforittoberun.Inputqueue–collectionofprocessesonthediskthatare
2、waitingtobebroughtintomemorytoruntheprogram.Userprogramsgothroughseveralstepsbeforebeingrun.OperatingSystemConcepts9.2Silberschatz,GalvinandGagne2002BindingofInstructionsandDatatoMemoryAddressbindingofinstructionsanddatatomemoryaddressescanhappenatthreedifferentstages.Compiletime:Ifmemoryl
3、ocationknownapriori,absolutecodecanbegenerated;mustrecompilecodeifstartinglocationchanges.Loadtime:Mustgeneraterelocatablecodeifmemorylocationisnotknownatcompiletime.Executiontime:Bindingdelayeduntilruntimeiftheprocesscanbemovedduringitsexecutionfromonememorysegmenttoanother.Needhardwaresup
4、portforaddressmaps(e.g.,baseandlimitregisters).OperatingSystemConcepts9.3Silberschatz,GalvinandGagne2002MultistepProcessingofaUserProgramOperatingSystemConcepts9.4Silberschatz,GalvinandGagne2002Logicalvs.PhysicalAddressSpaceTheconceptofalogicaladdressspacethatisboundtoaseparatephysicaladdr
5、essspaceiscentraltopropermemorymanagement.✦Logicaladdress–generatedbytheCPU;alsoreferredtoasvirtualaddress.✦Physicaladdress–addressseenbythememoryunit.Logicalandphysicaladdressesarethesameincompile-timeandload-timeaddress-bindingschemes;logical(virtual)andphysicaladdressesdifferinexecution-t
6、imeaddress-bindingscheme.OperatingSystemConcepts9.5Silberschatz,GalvinandGagne2002Memory-ManagementUnit(MMU)Hardwaredevicethatmapsvirtualtophysicaladdress.InMMUscheme,thevalueintherelocationregisterisaddedtoeveryaddressgeneratedbyauserprocessatthetimeitissenttomemory.Theuserprogramdealswi
7、thlogicaladdresses;itneverseestherealphysicaladdresses.OperatingSystemConcepts9.6Silberschatz,GalvinandGagne2002DynamicrelocationusingarelocationregisterOperatingSystemConcepts9.7Silberschatz,GalvinandGagne2002DynamicLoadingRoutineisnotloa
此文档下载收益归作者所有