欢迎来到天天文库
浏览记录
ID:40209234
大小:1.25 MB
页数:95页
时间:2019-07-26
《操作系统 内存管理》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、内容提要存储器的层次结构程序执行的基础知识、程序的装入和链接连续分配存储管理方式分页存储管理方式分段存储管理段页式存储管理存储器的层次结构存储器是计算机系统的重要组成部分容量、价格和速度之间的矛盾内存、外存;易失性和永久性内存,是稀缺资源在现代计算机系统中,存储通常采用层次结构来组织多级存储器结构主存与寄存器高速缓存和磁盘缓存多级存储器结构StoragesystemsinacomputersystemcanbeorganizedinahierarchySpeed,accesstimeCostperbitVolatility
2、主存vs.寄存器Same:AccessdirectlyforCPURegisternameMemoryaddressDifferent:accessspeedRegister,onecycleoftheCPUclockMemory,Manycycles(2ormore)Disadvantage:CPUneedstostallfrequently&thisisintolerableRemedyCache高级缓冲技术cachingCachingCopyinginformationintofasterstoragesystemW
3、henaccessing,firstcheckinthecache,ifIn:useitdirectlyNotin:getfromupperstoragesystem,andleaveacopyinthecacheUsingofcachingRegistersprovideahigh-speedcacheformainmemoryInstructioncache&datacacheMainmemorycanbeviewedasafastcacheforsecondarystorage……Magneticdisks磁盘Tra
4、nsfertime传输时间TT≈datasize*TransferrateTransferrate≈(nM/s)-1≈(nByte/us)-1≈1/nus/BytePositioningtime定位时间Seektime寻道TsRotationallatency旋转延迟TRTP≈Ts+TR≈mmsTTVS.TPPleaseStoredataclosely内容提要存储器的层次结构程序执行的基础知识、程序的装入和链接连续分配存储管理方式分页存储管理方式分段存储管理段页式存储管理程序执行的基础知识VonNeumannarchit
5、ecture冯·诺依曼体系结构ProgrammustbebroughtintomemoryMainmemoryisusuallytoosmallProcessProgrammustbeplacedwithinaprocessforittobeexecuted作业池UserprogramsWheretoplacetheprogramseveralsteps(图)地址的类型Absoluteaddress绝对地址AddressseenbythememoryunitPhysicaladdress物理地址Logicaladdress
6、逻辑地址GeneratedbytheCPUVirtualaddress虚拟地址Whencantheabsoluteaddresscanbedecided?Addressbinding地址的绑定Addressbinding地址绑定,thebindingofinstructionsanddatatomemory,可以在三种时刻进行CompiletimeIfmemorylocationknownapriori,absolutecodecanbegenerated;mustrecompilecodeifstartinglocat
7、ionchanges.LoadtimeMustgeneraterelocatablecodeifmemorylocationisnotknownatcompiletime.ExecutiontimeBindingdelayeduntilruntimeiftheprocesscanbemovedduringitsexecutionfromonememorysegmenttoanother.Needhardwaresupportforaddressmaps(e.g.,baseandlimitregisters)Memory-M
8、anagementUnit(MMU)Hardwaredevice,逻辑地址物理地址Relocationregister重定位寄存器AddedtoeveryaddressgeneratedbyauserprocessatthetimeitissenttomemoryE.g.MS-DOSon80x86Us
此文档下载收益归作者所有