中科大操作系统原理与实现课件9_VirtualMemory1.pdf

中科大操作系统原理与实现课件9_VirtualMemory1.pdf

ID:51506454

大小:405.83 KB

页数:32页

时间:2020-03-25

中科大操作系统原理与实现课件9_VirtualMemory1.pdf_第1页
中科大操作系统原理与实现课件9_VirtualMemory1.pdf_第2页
中科大操作系统原理与实现课件9_VirtualMemory1.pdf_第3页
中科大操作系统原理与实现课件9_VirtualMemory1.pdf_第4页
中科大操作系统原理与实现课件9_VirtualMemory1.pdf_第5页
资源描述:

《中科大操作系统原理与实现课件9_VirtualMemory1.pdf》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、操作系统原理与设计第9章VM1(虚存1)陈香兰中国科学技术大学计算机学院2009年09月01日......提纲BackgroundDemandPagingBasicConcepts(HWsupport)PerformanceofDemandPagingCopy-on-Write小结和作业......BackgroundII指令必须被装载到内存中运行I前面的解决方案IToplacetheentirelogicaladdressinphysicalmemoryIOverlays(覆盖)IDynamicloadingIDynamiclinkingI然而I有时

2、候作业很大;有时候作业个数很多I若从物理上扩展内存,代价太高I思路:从逻辑上扩展内存......BackgroundIII虚存技术的引入I程序的有些部分根本得不到或者只有很少的运行的机会,例如某些错误处理程序I有些数据根本得不到访问的机会I程序的局部性原理(localityofreference),1968,DenningI时间局部性、空间局部性I思路:部分装入、按需装入、置换I虚拟存储器:是指具有请求调度功能和置换功能,能从逻辑上对内存容量加以扩充的一种存储器系统I逻辑容量:从系统角度看:内存容量+外存容量从进程角度看:地址总线宽度范围内;内存容量+

3、外存容量I运行速度:接近内存I每位成本:接近外存......BackgroundIIIIVirtualmemory:separationofuserlogicalmemoryfromphysicalmemory.IOnlypartoftheprogramneedstobeinmemoryforexecutionILogicaladdressspacecanthereforebemuchlargerthanphysicaladdressspaceIAllowsaddressspacestobesharedbyseveralprocessesIAllows

4、formoreefficientprocesscreationIVirtualmemorycanbeimplementedvia:IDemandpagingI以分页技术为基础,加上I请求调页(pager)功能和页面置换功能I与对换相比,页面置换中换入换出的基本单位是页,而不是整个进程IDemandsegmentation......VirtualMemoryThatisLargerThanPhysicalMemory......虚拟存储器的特征I多次性:最重要的特征I一个作业被分成多次装入内存运行I对换性I允许在进程运行的过程中,(部分)换入换出I虚拟性

5、I逻辑上的扩充I虚拟性是以多次性和对换性为基础的。I多次性和对换性是建立在离散分配的基础上的......Virtual-addressSpaceIthevirtualaddressspaceofaprocessreferstothelogical(orvirtual)viewofhowaprocessisstoredinmemory.ITypically:0˜xxx&existsincontiguousmemoryIInfact,thephysicalmemoryareorganized(partitioned)inpageframes&thepage

6、framesassignedtoaprocessmaynotbecontiguous)MMU......Somebenifits1.SharedLibraryUsingVirtualMemory2.Sharedmemory3.speedingupprocesscreation......DemandPagingIDonotloadtheentireprograminphysicalmemoryatprogramexecutiontime.NONEED!IBringapageintomemoryonlywhenitisneededILessI/Oneede

7、dILessmemoryneededIFasterresponseIMoreusersIPageisneeded)referencetoitIinvalidreference)abortInot-in-memory)bringtomemoryISwapperVS.pagerIAswappermanipulatestheentireprocessesILazyswapperneverswapsapageintomemoryunlesspagewillbeneededISwapperthatdealswithindividualpagesisapager.

8、.....TransferofaPagedMemorytoContiguousDiskSpac

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

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

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