隨筆 - 53, 文章 - 0, 評論 - 3, 引用 - 0
          數(shù)據(jù)加載中……

          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)  編輯  收藏


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


          網(wǎng)站導航:
           
          主站蜘蛛池模板: 二连浩特市| 安乡县| 普洱| 永吉县| 房山区| 苍溪县| 定南县| 温泉县| 达州市| 河东区| 康乐县| 深泽县| 什邡市| 陇南市| 灌云县| 桐城市| 新丰县| 鄂州市| 张家界市| 吉隆县| 思南县| 思茅市| 疏勒县| 南京市| 松原市| 南涧| 金堂县| 东平县| 航空| 湄潭县| 十堰市| 乌拉特后旗| 九台市| 宜宾市| 阜平县| 祁连县| 雷州市| 灵台县| 怀柔区| 慈溪市| 桐柏县|