{"id":164287,"date":"2019-12-11T12:58:30","date_gmt":"2019-12-11T04:58:30","guid":{"rendered":"https:\/\/gulass.cn\/?p=164287"},"modified":"2019-11-29T11:03:13","modified_gmt":"2019-11-29T03:03:13","slug":"linux-virtual-memory","status":"publish","type":"post","link":"https:\/\/gulass.cn\/linux-virtual-memory.html","title":{"rendered":"Linux\u865a\u62df\u5185\u5b58\u90a3\u4e9b\u4e8b"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u4ee5\u5b58\u50a8\u5355\u5143\u4e3a\u5355\u4f4d\u6765\u7ba1\u7406\u663e\u7136\u4e0d\u73b0\u5b9e\uff0c\u56e0\u6b64Linux\u628a\u865a\u5b58\u7a7a\u95f4\u5206\u6210\u82e5\u5e72\u4e2a\u5927\u5c0f\u76f8\u7b49\u7684\u5b58\u50a8\u5206\u533a\uff0cLinux\u628a\u8fd9\u6837\u7684\u5206\u533a\u53eb\u505a \u9875\u3002\u4e3a\u4e86\u6362\u5165\u3001\u6362\u51fa\u7684\u65b9\u4fbf\uff0c\u7269\u7406\u5185\u5b58\u4e5f\u5c31\u6309\u9875\u7684\u5927\u5c0f\u5206\u6210\u82e5\u5e72\u4e2a\u5757\u3002\u7531\u4e8e\u7269\u7406\u5185\u5b58\u4e2d\u7684\u5757\u7a7a\u95f4\u662f\u7528\u6765\u5bb9\u7eb3\u865a\u5b58\u9875\u7684\u5bb9\u5668\uff0c\u6240\u4ee5\u7269\u7406\u5185\u5b58\u4e2d\u7684\u5757\u53eb\u505a \u9875\u6846\u3002\u9875\u4e0e\u9875\u6846\u662fLinux\u5b9e\u73b0\u865a\u62df\u5185\u5b58\u6280\u672f\u7684\u57fa\u7840\u3002 <\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n \u865a\u62df\u5185\u5b58\u7684\u9875\u3001\u7269\u7406\u5185\u5b58\u7684\u9875\u6846\u53ca\u9875\u8868<\/strong><\/div>\n \u5728Linux\u4e2d\uff0c\u9875\u4e0e\u9875\u6846\u7684\u5927\u5c0f\u4e00\u822c\u4e3a4KB\u3002\u5f53\u7136\uff0c\u6839\u636e\u7cfb\u7edf\u548c\u5e94\u7528\u7684\u4e0d\u540c\uff0c\u9875\u4e0e\u9875\u6846\u7684\u5927\u5c0f\u4e5f\u53ef\u6709\u6240\u53d8\u5316\u3002<\/p>\n \u7269\u7406\u5185\u5b58\u548c\u865a\u62df\u5185\u5b58\u88ab\u5206\u6210\u4e86\u9875\u6846\u4e0e\u9875\u4e4b\u540e\uff0c\u5176\u5b58\u50a8\u5355\u5143\u539f\u6765\u7684\u5730\u5740\u90fd\u88ab\u81ea\u7136\u5730\u5206\u6210\u4e86\u4e24\u6bb5\uff0c\u5e76\u4e14\u8fd9\u4e24\u6bb5\u5404\u81ea\u4ee3\u8868\u7740\u4e0d\u540c\u7684\u610f\u4e49\uff1a\u9ad8\u4f4d\u6bb5\u5206\u522b\u53eb\u505a\u9875\u6846\u7801\u548c\u9875\u7801\uff0c\u5b83\u4eec\u662f\u8bc6\u522b\u9875\u6846\u548c\u9875\u7684\u7f16\u7801;\u4f4e\u4f4d\u6bb5\u5206\u522b\u53eb\u505a\u9875\u6846\u504f\u79fb\u91cf\u548c\u9875\u5185\u504f\u79fb\u91cf\uff0c\u5b83\u4eec\u662f\u5b58\u50a8\u5355\u5143\u5728\u9875\u6846\u548c\u9875\u5185\u7684\u5730\u5740\u7f16\u7801\u3002<\/p>\n \u4e3a\u4e86\u4f7f\u7cfb\u7edf\u53ef\u4ee5\u6b63\u786e\u7684\u8bbf\u95ee\u865a\u5b58\u9875\u5728\u5bf9\u5e94\u9875\u6846\u4e2d\u7684\u6620\u50cf\uff0c\u5728\u628a\u4e00\u4e2a\u9875\u6620\u5c04\u5230\u67d0\u4e2a\u9875\u6846\u4e0a\u7684\u540c\u65f6\uff0c\u5c31\u5fc5\u987b\u628a\u9875\u7801\u548c\u5b58\u653e\u8be5\u9875\u6620\u50cf\u7684\u9875\u6846\u7801\u586b\u5165\u4e00\u4e2a\u53eb\u505a \u9875\u8868\u7684\u8868\u9879\u4e2d\u3002\u8fd9\u4e2a\u9875\u8868\u5c31\u662f\u4e4b\u524d\u63d0\u5230\u7684\u6620\u5c04\u8bb0\u5f55\u8868\u3002<\/p>\n \u4e5f\u5c31\u662f\u8bf4\uff1a\u5904\u7406\u5668\u9047\u5230\u7684\u5730\u5740\u90fd\u662f\u865a\u62df\u5730\u5740\u3002\u865a\u62df\u5730\u5740\u548c\u7269\u7406\u5730\u5740\u90fd\u5206\u6210\u9875\u7801(\u9875\u6846\u7801)\u548c\u504f\u79fb\u503c\u4e24\u90e8\u5206\u3002\u5728\u7531\u865a\u62df\u5730\u5740\u8f6c\u5316\u6210\u7269\u7406\u5730\u5740\u7684\u8fc7\u7a0b\u4e2d\uff0c\u504f\u79fb\u503c\u4e0d\u53d8\u3002\u800c\u9875\u7801\u548c\u9875\u6846\u7801\u4e4b\u95f4\u7684\u6620\u5c04\u5c31\u5728\u4e00\u4e2a\u6620\u5c04\u8bb0\u5f55\u8868\u2014\u2014\u9875\u8868\u4e2d\u3002<\/p>\n \u8bf7\u9875\u4e0e\u4ea4\u6362<\/strong><\/div>\n \u865a\u5b58\u9875\u9762\u5230\u7269\u7406\u9875\u6846\u7684\u6620\u5c04\u53eb\u505a\u9875\u9762\u7684 \u52a0\u8f7d\u3002<\/p>\n \u5f53\u5904\u7406\u5668\u8bd5\u56fe\u8bbf\u95ee\u4e00\u4e2a\u865a\u5b58\u9875\u9762\u65f6\uff0c\u9996\u5148\u5230\u9875\u8868\u4e2d\u53bb\u67e5\u8be2\u8be5\u9875\u662f\u5426\u5df2\u6620\u5c04\u5230\u7269\u7406\u9875\u6846\u4e2d\uff0c\u5e76\u8bb0\u5f55\u5728\u9875\u8868\u4e2d\u3002\u5982\u679c\u5728\uff0c\u5219MMU\u4f1a\u628a\u9875\u7801\u8f6c\u6362\u6210\u9875\u6846\u7801\uff0c\u5e76\u52a0\u4e0a\u865a\u62df\u5730\u5740\u63d0\u4f9b\u7684\u9875\u5185\u504f\u79fb\u91cf\u5f62\u6210\u7269\u7406\u5730\u5740\u540e\u53bb\u8bbf\u95ee\u7269\u7406\u5185\u5b58;\u5982\u679c\u4e0d\u5728\uff0c\u5219\u610f\u5473\u7740\u8be5\u865a\u5b58\u9875\u9762\u8fd8\u6ca1\u6709\u88ab\u8f7d\u5165\u5185\u5b58\uff0c\u8fd9\u65f6MMU\u5c31\u4f1a\u901a\u77e5\u64cd\u4f5c\u7cfb\u7edf\uff1a\u53d1\u751f\u4e86\u4e00\u4e2a\u9875\u9762\u8bbf\u95ee\u9519\u8bef(\u9875\u9762\u9519\u8bef)\uff0c\u63a5\u4e0b\u6765\u7cfb\u7edf\u4f1a\u542f\u52a8\u6240\u8c13\u7684\u201c\u8bf7\u9875\u201d\u673a\u5236\uff0c\u5373\u8c03\u7528\u76f8\u5e94\u7684\u7cfb\u7edf\u64cd\u4f5c\u51fd\u6570\uff0c\u5224\u65ad\u8be5\u865a\u62df\u5730\u5740\u662f\u5426\u4e3a\u6709\u6548\u5730\u5740\u3002<\/p>\n \u5982\u679c\u662f \u6709\u6548\u7684\u5730\u5740\uff0c\u5c31\u4ece\u865a\u62df\u5185\u5b58\u4e2d\u5c06\u8be5\u5730\u5740\u6307\u5411\u7684\u9875\u9762\u8bfb\u5165\u5230\u5185\u5b58\u4e2d\u7684\u4e00\u4e2a\u7a7a\u95f2\u9875\u6846\u4e2d\uff0c\u5e76\u5728\u9875\u8868\u4e2d\u6dfb\u52a0\u4e0a\u76f8\u5bf9\u5e94\u7684\u8868\u9879\uff0c***\u5904\u7406\u5668\u5c06\u4ece\u53d1\u751f\u9875\u9762\u9519\u8bef\u7684\u5730\u65b9\u91cd\u65b0\u5f00\u59cb\u8fd0\u884c;\u5982\u679c\u662f \u65e0\u6548\u7684\u5730\u5740\uff0c\u5219\u8868\u660e\u8fdb\u7a0b\u5728\u8bd5\u56fe\u8bbf\u95ee\u4e00\u4e2a\u4e0d\u5b58\u5728\u7684\u865a\u62df\u5730\u5740\uff0c\u6b64\u65f6\u64cd\u4f5c\u7cfb\u7edf\u5c06\u7ec8\u6b62\u6b64\u6b21\u8bbf\u95ee\u3002<\/p>\n \u5f53\u7136\uff0c\u4e5f\u5b58\u5728\u8fd9\u6837\u7684\u60c5\u51b5\uff1a\u5728\u8bf7\u9875\u6210\u529f\u4e4b\u540e\uff0c\u5185\u5b58\u4e2d\u5df2\u6ca1\u6709\u7a7a\u95f2\u7269\u7406\u9875\u6846\u4e86\u3002\u8fd9\u662f\uff0c\u7cfb\u7edf\u5fc5\u987b\u542f\u52a8\u6240\u8c13\u5730 \u4ea4\u6362\u673a\u5236\uff0c\u5373\u8c03\u7528\u76f8\u5e94\u7684\u5185\u6838\u64cd\u4f5c\u51fd\u6570\uff0c\u5728\u7269\u7406\u9875\u6846\u4e2d\u5bfb\u627e\u4e00\u4e2a\u5f53\u524d\u4e0d\u518d\u4f7f\u7528\u6216\u8005\u8fd1\u671f\u53ef\u80fd\u4e0d\u4f1a\u7528\u5230\u7684\u9875\u9762\u6240\u5360\u636e\u7684\u9875\u6846\u3002\u627e\u5230\u540e\uff0c\u5c31\u628a\u5176\u4e2d\u7684\u9875\u79fb\u51fa\uff0c\u4ee5\u88c5\u8f7d\u65b0\u7684\u9875\u9762\u3002\u5bf9\u79fb\u51fa\u9875\u9762\u6839\u636e\u4e24\u79cd\u60c5\u51b5\u6765\u5904\u7406\uff1a\u5982\u679c\u8be5\u9875\u672a\u88ab\u4fee\u6539\u8fc7\uff0c\u5219\u5220\u9664\u5b83;\u5982\u679c\u8be5\u9875\u66fe\u7ecf\u88ab\u4fee\u6539\u8fc7\uff0c\u5219\u7cfb\u7edf\u5fc5\u987b\u5c06\u8be5\u9875\u5199\u56de\u8f85\u5b58\u3002<\/p>\n \u4e3a\u4e86\u516c\u5e73\u5730\u9009\u62e9\u5c06\u8981\u4ece\u7cfb\u7edf\u4e2d\u629b\u5f03\u7684\u9875\u9762\uff0cLinux\u7cfb\u7edf\u4f7f\u7528 \u6700\u8fd1\u6700\u5c11\u4f7f\u7528(LRU)\u9875\u9762\u7684\u8870\u8001\u7b97\u6cd5\u3002\u8fd9\u79cd\u7b56\u7565\u6839\u636e\u7cfb\u7edf\u4e2d\u6bcf\u4e2a\u9875\u9762\u88ab\u8bbf\u95ee\u7684\u9891\u7387\uff0c\u4e3a\u7269\u7406\u9875\u6846\u4e2d\u7684\u9875\u9762\u8bbe\u7f6e\u4e86\u4e00\u4e2a\u53eb\u505a \u5e74\u9f84\u7684\u5c5e\u6027\u3002\u9875\u9762\u88ab\u8bbf\u95ee\u7684\u6b21\u6570\u8d8a\u591a\uff0c\u5219\u9875\u9762\u7684\u5e74\u9f84\u6700\u5c0f;\u76f8\u53cd\uff0c\u5219\u8d8a\u5927\u3002\u800c\u5e74\u9f84\u8f83\u5927\u7684\u9875\u9762\u5c31\u662f\u5f85\u6362\u51fa\u9875\u9762\u7684***\u5019\u9009\u8005\u3002<\/p>\n \u5feb\u8868<\/strong><\/div>\n \u5728\u7cfb\u7edf\u6bcf\u6b21\u8bbf\u95ee\u865a\u5b58\u9875\u65f6\uff0c\u90fd\u8981\u5728\u5185\u5b58\u7684\u6240\u6709\u9875\u8868\u4e2d\u5bfb\u627e\u8be5\u9875\u7684\u9875\u6846\uff0c\u8fd9\u662f\u4e00\u4e2a\u5f88\u8d39\u65f6\u95f4\u7684\u5de5\u4f5c\u3002\u4f46\u662f\uff0c\u4eba\u4eec\u53d1\u73b0\uff0c\u7cfb\u7edf\u4e00\u65e6\u8bbf\u95ee\u4e86\u67d0\u4e00\u4e2a\u9875\uff0c\u90a3\u4e48\u7cfb\u7edf\u5c31\u4f1a\u5728\u4e00\u6bb5\u65f6\u95f4\u5185\u7a33\u5b9a\u5730\u5de5\u4f5c\u5728\u8fd9\u4e2a\u9875\u4e0a\u3002\u6240\u4ee5\uff0c\u4e3a\u4e86\u63d0\u9ad8\u8bbf\u95ee\u9875\u8868\u7684\u901f\u5ea6\uff0c\u7cfb\u7edf\u8fd8\u914d\u5907\u4e86\u4e00\u7ec4\u6b63\u597d\u80fd\u5bb9\u7eb3\u4e00\u4e2a\u9875\u8868\u7684 \u786c\u4ef6\u5bc4\u5b58\u5668\uff0c\u8fd9\u6837\u5f53\u7cfb\u7edf\u518d\u8bbf\u95ee\u865a\u5b58\u65f6\uff0c\u5c31\u9996\u5148\u5230\u8fd9\u7ec4\u786c\u4ef6\u5bc4\u5b58\u5668\u4e2d\u53bb\u8bbf\u95ee\uff0c\u7cfb\u7edf\u901f\u5ea6\u5c31\u5feb\u591a\u4e86\u3002\u8fd9\u7ec4\u5b58\u653e\u5f53\u524d\u9875\u8868\u7684\u5bc4\u5b58\u5668\u53eb\u505a \u5feb\u8868\u3002<\/p>\n \u603b\u4e4b\uff0c\u4f7f\u7528\u865a\u62df\u5b58\u50a8\u6280\u672f\u65f6\uff0c\u5904\u7406\u5668\u5fc5\u987b\u914d\u5907\u4e00\u4e9b\u786c\u4ef6\u6765\u627f\u62c5\u5185\u5b58\u7ba1\u7406\u7684\u4e00\u90e8\u5206\u4efb\u52a1\u3002\u627f\u62c5\u5185\u5b58\u7ba1\u7406\u4efb\u52a1\u7684\u786c\u4ef6\u90e8\u5206\u53eb\u505a\u5b58\u50a8\u7ba1\u7406\u5355\u5143MMU\u3002<\/p>\n \u9875\u7684\u5171\u4eab<\/strong><\/div>\n \u5728\u591a\u7a0b\u5e8f\u7cfb\u7edf\u4e2d\uff0c\u5e38\u5e38\u6709\u591a\u4e2a\u7a0b\u5e8f\u9700\u8981\u5171\u4eab\u540c\u4e00\u6bb5\u4ee3\u7801\u6216\u6570\u636e\u7684\u60c5\u51b5\u3002\u5728\u5206\u9875\u7ba1\u7406\u7684\u5b58\u50a8\u5668\u4e2d\uff0c\u8fd9\u4e2a\u4e8b\u60c5\u5f88\u597d\u529e\uff1a\u8ba9\u591a\u4e2a\u7a0b\u5e8f\u5171\u4eab\u540c\u4e00\u4e2a\u9875\u9762\u5373\u53ef\u3002<\/p>\n \u5177\u4f53\u7684\u65b9\u6cd5\u662f\uff1a\u4f7f\u8fd9\u4e9b\u76f8\u5173\u7a0b\u5e8f\u7684\u865a\u62df\u7a7a\u95f4\u7684\u9875\u9762\u5728\u9875\u8868\u4e2d\u6307\u5411\u5185\u5b58\u4e2d\u7684\u540c\u4e00\u4e2a\u9875\u6846\u3002\u8fd9\u6837\uff0c\u5f53\u7a0b\u5e8f\u8fd0\u884c\u5e76\u8bbf\u95ee\u8fd9\u4e9b\u76f8\u5173\u9875\u9762\u65f6\uff0c\u5c31\u90fd\u662f\u5bf9\u540c\u4e00\u4e2a\u9875\u6846\u4e2d\u7684\u9875\u9762\u8fdb\u884c\u8bbf\u95ee\uff0c\u800c\u8be5\u9875\u6846\u4e2d\u7684\u9875\u5c31\u88ab\u8fd9\u4e9b\u7a0b\u5e8f\u6240\u5171\u4eab\u3002<\/p>\n \u9875\u7684\u4fdd\u62a4<\/strong><\/div>\n \u7531\u4e0a\u53ef\u77e5\uff0c\u9875\u8868\u5b9e\u9645\u4e0a\u662f\u7531\u865a\u62df\u7a7a\u95f4\u8f6c\u5230\u7269\u7406\u7a7a\u95f4\u7684\u5165\u53e3\u3002\u56e0\u6b64\uff0c\u4e3a\u4e86\u4fdd\u62a4\u9875\u9762\u5185\u5bb9\u4e0d\u88ab\u6ca1\u6709\u8be5\u9875\u9762\u8bbf\u95ee\u6743\u9650\u7684\u7a0b\u5e8f\u6240\u7834\u574f\uff0c\u5c31\u5e94\u5728\u9875\u8868\u7684\u8868\u9879\u4e2d\u8bbe\u7f6e\u4e00\u4e9b\u8bbf\u95ee\u63a7\u5236\u5b57\u6bb5\uff0c\u7528\u4e8e\u6307\u660e\u5bf9\u5e94\u9875\u9762\u4e2d\u7684\u5185\u5bb9\u5141\u8bb8\u4f55\u79cd\u64cd\u4f5c\uff0c\u4ece\u800c\u7981\u6b62\u975e\u6cd5\u8bbf\u95ee\u3002<\/p>\n \u6ce8\u610f\uff1a\u5176\u4e2d\u7684PCD\u4f4d\u8868\u793a\u7740\u662f\u5426\u5141\u8bb8\u9ad8\u901f\u7f13\u5b58(cache)\u3002<\/p>\n \u5982\u679c\u7a0b\u5e8f\u5bf9\u4e00\u4e2a\u9875\u8bd5\u56fe\u8fdb\u884c\u4e00\u4e2a\u8be5\u9875\u63a7\u5236\u5b57\u6bb5\u6240\u4e0d\u5141\u8bb8\u7684\u64cd\u4f5c\uff0c\u5219\u4f1a\u5f15\u8d77\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e00\u6b21\u4e2d\u65ad\u2014\u2014\u975e\u6cd5\u8bbf\u95ee\u4e2d\u65ad\uff0c\u5e76\u62d2\u7edd\u8fd9\u79cd\u64cd\u4f5c\uff0c\u4ece\u800c\u4fdd\u62a4\u8be5\u9875\u7684\u5185\u5bb9\u4e0d\u88ab\u7834\u574f\u3002<\/p>\n \u591a\u7ea7\u9875\u8868<\/strong><\/div>\n \u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u9875\u8868\u662f\u64cd\u4f5c\u7cfb\u7edf\u521b\u5efa\u7684\u7528\u4e8e\u5185\u5b58\u7ba1\u7406\u7684\u8868\u683c\u3002\u56e0\u6b64\uff0c\u4e00\u4e2a\u7a0b\u5e8f\u5728\u8fd0\u884c\u65f6\uff0c\u5176\u9875\u8868\u4e5f\u8981\u5b58\u653e\u5230\u5185\u5b58\u7a7a\u95f4\u3002\u5982\u679c\u4e00\u4e2a\u7a0b\u5e8f\u53ea\u9700\u8981\u4e00\u4e2a\u9875\u8868\uff0c\u5219\u4e0d\u4f1a\u6709\u4ec0\u4e48\u95ee\u9898\u3002\u4f46\u5982\u679c\uff0c\u7a0b\u5e8f\u7684\u865a\u62df\u7a7a\u95f4\u5f88\u5927\u7684\u8bdd\uff0c\u5c31\u4f1a\u51fa\u73b0\u4e00\u4e2a\u6bd4\u8f83\u5927\u7684\u95ee\u9898\u3002<\/p>\n \u6bd4\u5982\uff1a\u4e00\u4e2a\u7a0b\u5e8f\u7684\u865a\u62df\u7a7a\u95f4\u4e3a4GB\uff0c\u9875\u8868\u4ee54KB\u4e3a\u4e00\u9875\uff0c\u90a3\u4e48\u8fd9\u4e2a\u7a0b\u5e8f\u7a7a\u95f4\u5c31\u662f1M\u9875\u3002\u4e3a\u4e86\u5b58\u50a8\u8fd91M\u9875\u7684\u9875\u6307\u9488\uff0c\u90a3\u4e48\u8fd9\u4e2a\u9875\u8868\u7684\u957f\u5ea6\u5c31\u76f8\u5f53\u5927\u4e86\uff0c\u5bf9\u5185\u5b58\u7684\u8d1f\u62c5\u4e5f\u5f88\u5927\u4e86\u3002\u6240\u4ee5\uff0c***\u5bf9\u9875\u8868\u4e5f\u8fdb\u884c\u5206\u9875\u5b58\u50a8\uff0c\u5728\u7a0b\u5e8f\u8fd0\u884c\u65f6\u53ea\u628a\u9700\u8981\u7684\u9875\u590d\u5236\u5230\u5185\u5b58\uff0c\u800c\u6682\u65f6\u4e0d\u9700\u8981\u7684\u9875\u5c31\u8ba9\u5b83\u7559\u5728\u8f85\u5b58\u4e2d\u3002\u4e3a\u4e86\u7ba1\u7406\u8fd9\u4e9b\u9875\u8868\u9875\uff0c\u8fd8\u8981\u5efa\u7acb\u4e00\u4e2a \u8bb0\u5f55\u9875\u8868\u9875\u9996\u5730\u5740\u7684\u9875\u76ee\u5f55\u8868\uff0c\u4e8e\u662f\u5355\u7ea7\u9875\u8868\u5c31\u53d8\u6210\u4e86\u4e8c\u7ea7\u9875\u8868\u3002<\/p>\n \u5f53\u7136\uff0c\u5982\u679c\u7a0b\u5e8f\u7684\u865a\u62df\u7a7a\u95f4\u66f4\u5927\uff0c\u90a3\u4e48\u4e5f\u53ef\u4ee5\u7528\u4e09\u7ea7\u9875\u8868\u6765\u7ba1\u7406\u3002\u4e3a\u4e86\u5177\u6709\u901a\u7528\u6027\uff0cLinux\u7cfb\u7edf\u4f7f\u7528\u4e86\u4e09\u7ea7\u9875\u8868\u7ed3\u6784\uff1a\u9875\u76ee\u5f55(Page Directory\uff0cPGD)\u3001\u4e2d\u95f4\u9875\u76ee\u5f55(Page Middle Directory\uff0cPMD)\u3001\u9875\u8868(Page Table\uff0cPTE)\u3002<\/p>\n Linux\u7684\u9875\u8868\u7ed3\u6784<\/strong><\/p>\n \u4e3a\u4e86\u901a\u7528\uff0cLinux\u7cfb\u7edf\u4f7f\u7528\u4e86\u4e09\u7ea7\u9875\u8868\u7ed3\u6784\uff1a\u9875\u76ee\u5f55\u3001\u4e2d\u95f4\u9875\u76ee\u5f55\u548c\u9875\u8868\u3002PGD\u4e3a ***\u9875\u8868\uff0c\u662f\u4e00\u4e2apgdt\u6570\u636e\u7c7b\u578b\u7684\u6570\u7ec4\uff0c\u6bcf\u4e2a\u6570\u7ec4\u5143\u7d20\u6307\u5411\u4e00\u4e2a\u4e2d\u95f4\u9875\u76ee\u5f55;PMD\u4e3a \u4e8c\u7ea7\u9875\u8868\uff0c\u662f\u4e00\u4e2apmdt\u6570\u636e\u7ed3\u6784\u7684\u6570\u7ec4\uff0c\u6bcf\u4e2a\u6570\u7ec4\u5143\u7d20\u6307\u5411\u4e00\u4e2a\u9875\u8868;PTE\u5219\u662f \u9875\u8868\uff0c\u662f\u4e00\u4e2apte_t\u6570\u636e\u7c7b\u578b\u7684\u6570\u7ec4\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e2d\u542b\u6709\u7269\u7406\u5730\u5740\u3002<\/p>\n \u4e3a\u4e86\u5e94\u7528\u4e0a\u7684\u7075\u6d3b\uff0cLinux\u4f7f\u7528\u4e00\u7cfb\u5217\u7684\u5b8f\u6765\u63a9\u76d6\u5404\u79cd\u5e73\u53f0\u7684\u7ec6\u8282\u3002\u7528\u6237\u53ef\u4ee5\u5728\u914d\u7f6e\u6587\u4ef6 config\u4e2d\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u5bf9\u9875\u8868\u8fdb\u884c\u914d\u7f6e\uff0c\u4ee5\u51b3\u5b9a\u662f\u4f7f\u7528\u4e09\u7ea7\u9875\u8868\u8fd8\u662f\u4f7f\u7528\u4e8c\u7ea7\u9875\u8868\u3002<\/p>\n \u5728\u7cfb\u7edf\u7f16\u8bd1\u65f6\uff0c\u4f1a\u6839\u636e\u914d\u7f6e\u6587\u4ef6 config\u4e2d\u7684\u914d\u7f6e\uff0c\u628a\u76ee\u5f55 include\/asm\u7b26\u53f7\u8fde\u63a5\u5230\u5177\u4f53CPU\u4e13\u7528\u7684\u6587\u4ef6\u76ee\u5f55\u4e2d\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8ei386CPU\uff0c\u8be5\u76ee\u5f55\u7b26\u53f7\u4f1a\u8fde\u63a5\u5230include\/asm-i386\uff0c\u5e76\u5728\u6587\u4ef6pgable-2level-defs.h\u4e2d\u5b9a\u4e49\u4e86\u4e8c\u7ea7\u9875\u8868\u7684\u57fa\u672c\u7ed3\u6784\uff0c<\/p>\n \u5176\u4e2d\u8fd8\u5b9a\u4e49\u4e86\uff1a<\/p>\n \u5728\u6587\u4ef6include\/asm-i386\/pgtable.h\u4e2d\u5b9a\u4e49\u4e86\u9875\u76ee\u5f55\u548c\u9875\u8868\u9879\u7684\u6570\u636e\u7ed3\u6784\uff0c\u5982\u4e0b\uff1a<\/p>\n \u4ece\u5b9a\u4e49\u53ef\u77e5\uff0c\u5b83\u4eec\u90fd\u662f\u53ea\u6709\u4e00\u4e2a \u957f\u6574\u578b\u7c7b\u578b(32\u4f4d)\u7684\u7ed3\u6784\u4f53\u3002<\/p>\n \u6ce8\u610f\uff1a\u5982\u4e0a\u6587\u7684\u201c\u9875\u7684\u4fdd\u62a4\u201d\u90e8\u5206\uff0c\u9875\u6846\u7801\u4ee3\u8868\u7269\u7406\u5730\u5740\uff0c\u53ea\u9700\u8981\u9ad820\u4f4d\u5c31\u591f\u4e86(\u56e0\u4e3a\u9875\u6846\u7684\u957f\u5ea6\u4e3a4KB\uff0c\u56e0\u6b64\u9875\u5185\u504f\u79fb12\u4f4d)\u3002\u800c\u540e12\u4f4d\u53ef\u4ee5\u5b58\u653e\u5404\u4e2a\u72b6\u6001\u4fe1\u606f\u548c\u8bbf\u95ee\u6743\u9650\u3002\u4f46\u662fLinux\u5e76\u6ca1\u6709\u8fd9\u6837\u505a\uff0c\u53cd\u800c\u91cd\u65b0\u5b9a\u4e49\u4e86\u4e00\u4e2a\u7ed3\u6784\u4f53\u6765\u5b58\u653e\uff0c\u901a\u8fc7\u201c\u6216\u201d\u8fd0\u7b97\u6765\u5c06\u4e24\u8005\u7ed3\u5408\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u5728Linux\u4e2d\uff0c\u9875\u4e0e\u9875\u6846\u7684\u5927\u5c0f\u4e00\u822c\u4e3a4KB\u3002\u5f53\u7136\uff0c\u6839\u636e\u7cfb\u7edf\u548c\u5e94\u7528\u7684\u4e0d\u540c\uff0c\u9875\u4e0e\u9875\u6846\u7684\u5927\u5c0f\u4e5f\u53ef\u6709\u6240\u53d8\u5316\u3002 \u7269\u7406\u5185\u5b58 […]<\/p>\n","protected":false},"author":1469,"featured_media":164288,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-164287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/164287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1469"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=164287"}],"version-history":[{"count":10,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/164287\/revisions"}],"predecessor-version":[{"id":165586,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/164287\/revisions\/165586"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/164288"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=164287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=164287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=164287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}} |