Simple summary of virtual memory
来源:互联网 发布:哪里可以买淘宝店铺 编辑:程序博客网 时间:2024/06/04 19:38
Search some materials on the internet and books. Review the knowledge and make a simple summary.
1 Virtual memory
Virtual memory is a memory managementtechnology for modern multitasking operating system. Processes do not get thephysical memory directly. Each process runs on its own virtual memory which is automaticallytranslated into real memory by operating system and hardware.
The application program thinks it has alarge range of continuous address space. In reality, the parts it is currentlyusing are scattered around the RAM, and the inactive parts are saved in harddisk. No matter how much the physical memory is in a computer, the amount ofvirtual memory space in a 32 bit system is always 4GB.
The virtual address space starts at zero.It is composed of many fixed size pages. It includes Text, Data, BSS, Heap, andStack at least. The heap and stack can shrink or grow.
A simple example
char courty = “China”; [global var. “China”is Text and read-only data]
int prvNum; [Not initialized, BSS]
char * fun(void){
char * p; [localvar; Stack]
prvNum = 33;
p = malloc(prvNum);[Heap;dynamic memory]
return p;
}
2. page
Page is a fixed-length block of mainmemory. It is continuous in both physical memory addressing space and
virtual memory addressing space. A page isusually the smallest unit of data for the following:
1.Memory allocation performed by the operating system for a program
2.transfer between main memory and any other auxiliary store.
Two-level page table structure
There are many sub tables that cover all the virtual address space. Amaster table convers all sub tables. An address refers to the master table. Thevirtual address is divided into three parts. See the next picture. Using multi-level page table structureaccelerates the searching speed. I call the idea as classification.
Otherexamples: army organization; a book content table and contents.
Reference:
http://en.wikipedia.org/wiki/Dynamic_memory_allocation
http://members.shaw.ca/bsanders/WindowsGeneralWeb/RAMVirtualMemoryPageFileEtc.htm
http://www.cs.princeton.edu/courses/archive/spr04/cos217/lectures/Memory.pdf
- Simple summary of virtual memory
- The summary of virtual memory
- Simple summary of EJB
- Usage simple of shared memory
- Summary of Manual Memory Management Rules
- Virtual Memory II: the return of objrmap
- OOM killer "Out of Memory: Killed process" SOLUTIONS / SUMMARY
- OOM killer "Out of Memory: Killed process" SOLUTIONS / SUMMARY
- the memory of virtual base class of C++
- virtual memory
- Virtual Memory
- Virtual Memory
- OpenGL API simple summary
- Memory Layout (Virtual address space of a C process)
- SurfaceFlinger/gralloc Out of Memory error when allocating buffer memory for use with virtual frame
- beyond virtual memory limits. Current usage: 142.3 MB of 1 GB physical memory used;
- Chapter 6 Memory Hierarchy -- Summary
- LINUX kernel memory barrier summary
- 总结的一些PHP开发中的tips
- .NET Framework 4 文件IO读写的增强 激动人心的强大 或许正是你所期待的 基类库中的新增内容 转自msdn杂志
- 获取数组中最大的值
- tomcat ,apache 负载均衡配置
- unable to open an initial console 问题解决
- Simple summary of virtual memory
- MS-SQL2005服务器登录名、角色、数据库用户、角色、架构的关系
- c++学习笔记
- DNN中搜索引擎原理——数据库分析篇
- linux下装Vmware工具
- java IO写入文件效率——几种方法比较
- OC4J 10g (9.0.4) FAQ(翻译)
- 远程控制ubuntu10.04
- 减轻秒杀服务器压力的损招