{"id":13,"date":"2025-10-07T22:36:32","date_gmt":"2025-10-07T14:36:32","guid":{"rendered":"http:\/\/47.99.178.170\/?p=13"},"modified":"2025-10-14T15:43:49","modified_gmt":"2025-10-14T07:43:49","slug":"%e5%86%85%e6%a0%b8%e7%ba%bf%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.garfield-blog.top\/?p=13","title":{"rendered":"\u3010Linux\u3011\u5185\u6838\u7ebf\u7a0b"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<h1>\u5185\u6838\u7ebf\u7a0b<\/h1>\n<h2>\u6982\u8ff0<\/h2>\n<p>\u5185\u6838\u7ebf\u7a0b\uff08<code>thread<\/code>\uff09\u6216\u53eb\u5b88\u62a4\u8fdb\u7a0b\uff08<code>daemon<\/code>\uff09\uff0c\u5728\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u5360\u636e\u76f8\u5f53\u5927\u7684\u6bd4\u4f8b\uff0c\u5f53 Linux\u64cd\u4f5c\u7cfb\u7edf\u542f\u52a8\u4ee5\u540e\uff0c\u5c24\u5176\u662f Xwindow \u4e5f\u542f\u52a8\u4ee5\u540e\uff0c\u4f60\u53ef\u4ee5\u7528\u201cps\u201d\u547d\u4ee4\u67e5\u770b\u7cfb\u7edf\u4e2d\u7684\u8fdb\u7a0b\uff0c\u8fd9\u65f6\u4f1a\u53d1\u73b0\u5f88\u591a\u4ee5\u201cd\u201d\u7ed3\u5c3e\u7684\u8fdb\u7a0b\u540d\uff0c\u8fd9\u4e9b\u8fdb\u7a0b\u5c31\u662f\u5185\u6838\u7ebf\u7a0b\u3002 \u5185\u6838\u7ebf\u7a0b\u4e5f\u53ef\u4ee5\u53eb\u5185\u6838\u4efb\u52a1\uff0c\u5b83\u4eec\u5468\u671f\u6027\u5730\u6267\u884c\uff0c\u4f8b\u5982\uff0c\u78c1\u76d8\u9ad8\u901f\u7f13\u5b58\u7684\u5237\u65b0\uff0c\u7f51\u7edc\u8fde\u63a5\u7684\u7ef4\u62a4\uff0c\u9875\u9762\u7684\u6362\u5165\u6362\u51fa\u7b49\u3002\u5728 Linux \u4e2d\uff0c\u5185\u6838\u7ebf\u7a0b\u4e0e\u666e\u901a\u8fdb\u7a0b\u6709\u4e00\u4e9b\u672c\u8d28\u7684\u533a\u522b\uff0c\u4ece\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\u53ef\u4ee5\u770b\u51fa\u4e8c\u8005\u4e4b\u95f4\u7684\u5dee\u5f02\u3002<\/p>\n<h2>\u4e0e\u666e\u901a\u8fdb\u7a0b\u7684\u533a\u5206<\/h2>\n<ul>\n<li>\n<p>\u5185\u6838\u7ebf\u7a0b\u6267\u884c\u7684\u662f\u5185\u6838\u4e2d\u7684\u51fd\u6570\uff0c\u800c\u666e\u901a\u8fdb\u7a0b\u53ea\u6709\u901a\u8fc7\u7cfb\u7edf\u8c03\u7528\u624d\u80fd\u6267\u884c\u5185\u6838\u4e2d\u7684\u51fd\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u5185\u6838\u7ebf\u7a0b\u53ea\u8fd0\u884c\u5728\u5185\u6838\u6001\uff0c\u800c\u666e\u901a\u8fdb\u7a0b\u65e2\u53ef\u4ee5\u8fd0\u884c\u5728\u7528\u6237\u6001\uff0c\u4e5f\u53ef\u4ee5\u8fd0\u884c\u5728\u5185\u6838\u6001\u3002<\/p>\n<\/li>\n<li>\n<p>\u56e0\u4e3a\u5185\u6838\u7ebf\u7a0b\u6307\u53ea\u8fd0\u884c\u5728\u5185\u6838\u6001\uff0c\u56e0\u6b64\uff0c\u5b83\u53ea\u80fd\u4f7f\u7528\u5927\u4e8e PAGE_OFFSET\uff083G\uff09\u7684\u5730\u5740\u7a7a\u95f4\u3002\u53e6\u4e00\u65b9\u9762\uff0c\u4e0d\u7ba1\u5728\u7528\u6237\u6001\u8fd8\u662f\u5185\u6838\u6001\uff0c\u666e\u901a\u8fdb\u7a0b\u53ef\u4ee5\u4f7f\u7528 4GB \u7684\u5730\u5740\u7a7a\u95f4\u3002<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u9762\u7ed9\u51fa\u201c\u600e\u4e48\u533a\u5206\u5185\u6838\u7ebf\u7a0b\u201d\u548c\u201c\u666e\u901a\u8fdb\u7a0b\/\u7528\u6237\u7ebf\u7a0b\u201d\u7684\u65b9\u6cd5<\/strong><\/p>\n<ul>\n<li>\u540d\u79f0\u7279\u5f81\uff1aps\/top\/htop \u4e2d\uff0c\u5185\u6838\u7ebf\u7a0b\u540d\u79f0\u901a\u5e38\u7528\u65b9\u62ec\u53f7\u5305\u88f9\uff0c\u5982 [kworker\/0:1]\u3001[rcu_sched]\u3002<\/li>\n<li>\u7236\u8fdb\u7a0b\uff1a\u591a\u4ee5 kthreadd\uff08PID 2\uff09\u4e3a\u7236\u8fdb\u7a0b\u3002<\/li>\n<li>\u65e0\u7528\u6237\u6001\u6620\u50cf\uff1a\/proc\/PID\/exe \u4e0d\u5b58\u5728\u6216\u4e0d\u53ef\u89e3\u6790\uff1b\/proc\/PID\/cmdline \u4e0e \/proc\/PID\/environ \u901a\u5e38\u4e3a\u7a7a\u3002<\/li>\n<li>\u6807\u5fd7\u4f4d\uff1a\/proc\/PID\/status \u7684 Flags \u5b57\u6bb5\u5305\u542b PF_KTHREAD\uff080x00200000\uff09\u8868\u793a\u5185\u6838\u7ebf\u7a0b\u3002<\/li>\n<li>\u5de5\u5177\u63d0\u793a\uff1ahtop \u53ef\u5728 F2 -&gt; Display options -&gt; Show kernel threads \u6253\u5f00\/\u9690\u85cf\u5185\u6838\u7ebf\u7a0b\u3002<\/li>\n<\/ul>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5185\u6838\u7ebf\u7a0b \u6982\u8ff0 \u5185\u6838\u7ebf\u7a0b\uff08thread\uff09\u6216\u53eb\u5b88\u62a4\u8fdb\u7a0b\uff08daemon\uff09\uff0c\u5728\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u5360\u636e\u76f8\u5f53\u5927\u7684\u6bd4\u4f8b\uff0c\u5f53 Lin [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-linux-knowledge"],"_links":{"self":[{"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13"}],"version-history":[{"count":3,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":75,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions\/75"}],"wp:attachment":[{"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}