- 7
- 0
- 约1.06万字
- 约 31页
- 2017-08-08 发布于重庆
- 举报
MemoryManagementOverlaysandVirtualMemory:managementoverlays内存和虚拟内存.ppt
Memory Management:Overlays and Virtual Memory Lecture 14 How Does a Program Start Running? What if the program is too big? Some machines wont let you run the program Original DOS Why this limitation? Solution: Only Load Part of the Program One option: programmer breaks code into pieces that fit into RAM Pieces, called overlays, are loaded and unloaded by the program Does not require OS help ARM Linker Supports Overlays Overlay manager loads an overlay segment when it is not in RAM Supports Static and Dynamic Overlays Static overlays One root segment 2 or more memory partitions (1 for the root partition which is always in RAM) Within each partition, any number of overlay segments Only 1 overlay segment can be in a partition at a given time Application writer specifies what is in each partition and segment What Happens if ... A function in one overlay calls a function in another - and vice-versa Dynamic Overlay Include re-location information with each overlay segment Have overlay manager allocate memory for an overlay segment when it is first loaded Load and unload overlay segments by explicit calls to overlay manager Each overlay segment is given its own name - linker links each as if it were in its own partition Problems with Overlays Difficult for programmer to manage Not general - management of resources (RAM) is an operating system issue But many embedded systems do not have the space or power for a “real” OS Solution: Virtual Memory What is virtual memory? Technique that allows execution of a program that may not completely reside in memory (RAM) Allows the computer to “fake” a program into believing that its memory space is larger than physical RAM Why is VM important? Cheap - no longer have to buy lots of RAM Removes burden of memory resource management from the programmer Other benefits ... The Memory Pyramid How Does VM Work ? Two memory “spaces” Virtual memory space - what the program “sees” Physical memory space - wha
原创力文档

文档评论(0)