隨筆 - 53, 文章 - 0, 評論 - 3, 引用 - 0
          數據加載中……

          High level summary of my understanding on Linux Kernel Memory Management

          Here is just the high level summary of my understanding on Linux Kernel Memory Management. I think it can help achieve a better understanding of the book <<understanding linux kernel>>.

          It is said, the memory management is most complex sub-system in linux kernel, at the same time, there aren't too much System Calls for it. Becuase most the the complex mechanism happens trasparently to the user process, such as COW(Copy On Write), On Demand Paging. For user process, to successfully refer to a linear memory address, the following factors are necessary:
              vm_area_struct (Virtual Memory Area, Memory Region) are set up correctly.
              Phsical memory are allocated.
              Page Global Directory, Page Table, and the corresponding entry are correclty set up according to Virtual Memory Area and Phisical Meory.
             
          This three factors can be further simplified as
              Virtual Memory
              Phisical Memory
              Mappting between Virtual Momory and Phisical Memory.

          From user process's perspective, only Virtual Memory is visible, when user process applys for memory, he got virtual memory; phisical memory may not be allocated yet. All these three factors are managed by the kernel, they can be thought of as three resource managed by the kernel. kernel not only need to manage the Virtual Memoty in user address space, but also need to manage Virtual Memory in kernel address space.

          When user process try to use his virtual memory, but the phisical memory is not allocated yet. Page Exception happens, kernel take charge of it and allocate the phisical memory and set up the mapping. user process reexecute the instruction and everything go forward smoothly. It's called On Demand Paging.

          Besides that there are many more concepts, such as Memory mapping, non-linear memory mapping. I will continue this article when I dig into the details.

          posted on 2008-07-29 12:20 InPractice 閱讀(285) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 宝鸡市| 清河县| 敦煌市| 宣化县| 天峻县| 清丰县| 屯留县| 绥阳县| 尉氏县| 龙山县| 宜川县| 无为县| 年辖:市辖区| 南皮县| 林甸县| 阳春市| 布拖县| 延长县| 巴南区| 平邑县| 宁化县| 巨野县| 舒兰市| 武川县| 和硕县| 西安市| 长汀县| 崇义县| 准格尔旗| 绥芬河市| 道真| 醴陵市| 上蔡县| 徐水县| 山阳县| 锡林浩特市| 定州市| 邳州市| 怀远县| 红原县| 安多县|