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

          My confusion about kernel and corresponding clarification.

          There are many questions coming into my mind when I read the Linux kernel book and source code. As time goes by, I become more knowledgeable than before and can address those questions by myself, here is the first question addressed by myself.

           

          Q: why kernel have to map the high memory in kernel space, why not just allocate the high memory and only map it in user process.

          A: Because kernel also need to access the high memory before it returned the allocated memory to user process. For example, kernel must zero the page or initialized the page for security reason. Please refer to linux device driver page 9.

          Q: why not let the clib zero the page or initialize it, it saves the kernel's effort and simplifies the kernel.

          A: besides Requesting memory through clib, user program can also request memory through direct System call, in this situation, the security is not guaranteed, the information in memory will be leaked.

          posted on 2008-10-08 14:40 InPractice 閱讀(161) 評論(0)  編輯  收藏


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


          網站導航:
           
          主站蜘蛛池模板: 开化县| 琼海市| 渭南市| 葫芦岛市| 金湖县| 石嘴山市| 射阳县| 云龙县| 麟游县| 武功县| 印江| 宁安市| 建阳市| 揭东县| 陇川县| 汕尾市| 洪雅县| 三明市| 乌兰察布市| 五河县| 镇赉县| 米泉市| 龙山县| 通州市| 泾阳县| 厦门市| 贡觉县| 阳城县| 开封市| 简阳市| 呼伦贝尔市| 湛江市| 贵州省| 彩票| 淳安县| 阳朔县| 正安县| 威信县| 嘉黎县| 兴安县| 邹城市|