{"id":38905,"date":"2023-07-19T11:23:58","date_gmt":"2023-07-19T03:23:58","guid":{"rendered":"https:\/\/docs.pingcode.com\/?p=38905"},"modified":"2023-07-31T00:46:50","modified_gmt":"2023-07-30T16:46:50","slug":"%e4%bb%80%e4%b9%88%e6%98%aflinux%e8%bf%9b%e7%a8%8b%e8%b0%83%e5%ba%a6%e5%99%a8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/38905.html","title":{"rendered":"\u4ec0\u4e48\u662fLinux\u8fdb\u7a0b\u8c03\u5ea6\u5668"},"content":{"rendered":"<blockquote class=\"wp-block-quote\">\n<p>Linux\u8fdb\u7a0b\u8c03\u5ea6\u5668\u662fLinux\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u7684\u4e00\u90e8\u5206\uff0c\u8d1f\u8d23\u51b3\u5b9a\u54ea\u4e2a\u8fdb\u7a0b\u5e94\u8be5\u4f7f\u7528CPU\u7684\u8d44\u6e90\uff0c\u4ee5\u53ca\u4f55\u65f6\u4f7f\u7528\u3002\u5b83\u901a\u8fc7\u8bc4\u4f30\u8fdb\u7a0b\u7684\u4f18\u5148\u7ea7\u3001\u8fdb\u7a0b\u7c7b\u578b\u3001\u5df2\u7528\u65f6\u95f4\u7b49\u56e0\u7d20\u8fdb\u884c\u51b3\u7b56\uff0c\u786e\u4fdd\u7cfb\u7edf\u8d44\u6e90\u7684\u516c\u5e73\u4f7f\u7528\u548c\u6709\u6548\u8fd0\u884c\u3002\u8c03\u5ea6\u5668\u7684\u7b97\u6cd5\u548c\u7b56\u7565\u5728\u4e0d\u65ad\u4f18\u5316\u4e2d\uff0c\u4ee5\u9002\u5e94\u591a\u6838\u3001\u591a\u7ebf\u7a0b\u7684\u73b0\u4ee3\u8ba1\u7b97\u73af\u5883\u3002<\/p>\n<\/blockquote>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" alt=\"\" class=\"wp-image-38906\" decoding=\"async\" height=\"421\" sizes=\"(max-width: 680px) 100vw, 680px\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/07\/\u6dfb\u52a0\u6807\u9898-10-7.png?x-oss-process=image\/auto-orient,1\/format,webp\" srcset=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/07\/\u6dfb\u52a0\u6807\u9898-10-7.png?x-oss-process=image\/auto-orient,1\/format,webp 680w, https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/07\/\u6dfb\u52a0\u6807\u9898-10-7-300x186.png 300w\" width=\"680\"\/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\"><strong>Linux<\/strong><strong>\u8fdb\u7a0b\u8c03\u5ea6\u5668\u662f\u4ec0\u4e48<\/strong><\/h2>\n<p>\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u8fdb\u7a0b\u8c03\u5ea6\u5668\uff08Process Scheduler\uff09\u662f\u5185\u6838\u7684\u91cd\u8981\u7ec4\u6210\u90e8\u5206\uff0c\u5b83\u7ba1\u7406\u7740\u6240\u6709\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\uff0c\u5e76\u51b3\u5b9a\u54ea\u4e9b\u8fdb\u7a0b\u5e94\u8be5\u88ab\u5206\u914d\u5230CPU\u8fdb\u884c\u5904\u7406\u3002Linux\u8fdb\u7a0b\u8c03\u5ea6\u5668\u8bbe\u8ba1\u4e4b\u521d\u5c31\u4ee5\u786e\u4fdd\u516c\u5e73\u3001\u6709\u6548\u7387\u7684\u8d44\u6e90\u5229\u7528\u4e3a\u76ee\u6807\uff0c\u8fd9\u662f\u901a\u8fc7\u8bc4\u4f30\u8fdb\u7a0b\u7684\u4f18\u5148\u7ea7\u548c\u9700\u8981\u7684\u65f6\u95f4\u6765\u5b9e\u73b0\u7684\u3002<\/p>\n<h2 class=\"wp-block-heading\"><strong>Linux<\/strong><strong>\u8fdb\u7a0b\u8c03\u5ea6\u5668\u7684\u5de5\u4f5c\u539f\u7406<\/strong><\/h2>\n<p>Linux\u8fdb\u7a0b\u8c03\u5ea6\u5668\u4e3b\u8981\u4f9d\u9760\u4e24\u4e2a\u56e0\u7d20\u6765\u786e\u5b9a\u8fdb\u7a0b\u6267\u884c\u987a\u5e8f\uff1a\u4f18\u5148\u7ea7\uff08Priority\uff09\u548c\u65f6\u95f4\u7247\uff08Time Slice\uff09\u3002\u8fdb\u7a0b\u7684\u4f18\u5148\u7ea7\u51b3\u5b9a\u4e86\u5176\u5728\u7b49\u5f85\u961f\u5217\u4e2d\u7684\u4f4d\u7f6e\uff0c\u4f18\u5148\u7ea7\u8d8a\u9ad8\uff0c\u8fdb\u7a0b\u8d8a\u5148\u88ab\u8c03\u5ea6\u3002\u65f6\u95f4\u7247\u5219\u662f\u8fdb\u7a0b\u88ab\u5206\u914d\u5230\u7684CPU\u4f7f\u7528\u65f6\u95f4\uff0c\u65f6\u95f4\u7247\u7528\u5b8c\u540e\uff0c\u8fdb\u7a0b\u5c06\u88ab\u79fb\u56de\u7b49\u5f85\u961f\u5217\uff0c\u7b49\u5f85\u4e0b\u4e00\u6b21\u88ab\u8c03\u5ea6\u3002<\/p>\n<h2 class=\"wp-block-heading\"><strong>Linux<\/strong><strong>\u8fdb\u7a0b\u8c03\u5ea6\u5668\u7684\u79cd\u7c7b<\/strong><\/h2>\n<p>\u6839\u636e\u4e0d\u540c\u7684\u9700\u6c42\u548c\u73af\u5883\uff0cLinux\u5185\u6838\u63d0\u4f9b\u4e86\u591a\u79cd\u4e0d\u540c\u7684\u8fdb\u7a0b\u8c03\u5ea6\u5668\uff0c\u5982\uff1a<\/p>\n<ul>\n<li>Completely Fair Scheduler\uff08CFS\uff09\uff1a\u4f5c\u4e3a\u9ed8\u8ba4\u7684\u8c03\u5ea6\u5668\uff0cCFS\u81f4\u529b\u4e8e\u4fdd\u8bc1\u6240\u6709\u8fdb\u7a0b\u516c\u5e73\u5730\u5206\u4eabCPU\u8d44\u6e90\u3002\u5b83\u4f7f\u7528\u7ea2\u9ed1\u6811\u6570\u636e\u7ed3\u6784\u7ba1\u7406\u8fdb\u7a0b\uff0c\u5e76\u901a\u8fc7\u865a\u62df\u8fd0\u884c\u65f6\u95f4\u7684\u6982\u5ff5\u6765\u8ba1\u7b97\u8fdb\u7a0b\u4f18\u5148\u7ea7\u3002<\/li>\n<li>Real-Time Scheduler\uff1a\u5b9e\u65f6\u8c03\u5ea6\u5668\u5219\u7528\u4e8e\u5904\u7406\u90a3\u4e9b\u5bf9\u54cd\u5e94\u65f6\u95f4\u8981\u6c42\u5f88\u9ad8\u7684\u8fdb\u7a0b\u3002\u5b9e\u65f6\u8c03\u5ea6\u5668\u6309\u7167\u4f18\u5148\u7ea7\u8c03\u5ea6\u8fdb\u7a0b\uff0c\u5e76\u4fdd\u8bc1\u9ad8\u4f18\u5148\u7ea7\u7684\u8fdb\u7a0b\u603b\u662f\u5728\u4f4e\u4f18\u5148\u7ea7\u8fdb\u7a0b\u4e4b\u524d\u8fd0\u884c\u3002<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\"><strong>Linux<\/strong><strong>\u8fdb\u7a0b\u8c03\u5ea6\u5668\u7684\u6539\u8fdb\u548c\u6311\u6218<\/strong><\/h2>\n<p>\u968f\u7740\u8ba1\u7b97\u73af\u5883\u7684\u53d1\u5c55\uff0c\u591a\u6838\u548c\u591a\u7ebf\u7a0b\u7684\u5904\u7406\u5668\u6210\u4e3a\u4e3b\u6d41\uff0cLinux\u8fdb\u7a0b\u8c03\u5ea6\u5668\u9762\u4e34\u7740\u65b0\u7684\u6311\u6218\u3002\u4e3a\u4e86\u66f4\u597d\u5730\u9002\u5e94\u8fd9\u79cd\u73af\u5883\uff0cLinux\u5185\u6838\u5f15\u5165\u4e86\u8c03\u5ea6\u57df\uff08Scheduling Domains\uff09\u7684\u6982\u5ff5\uff0c\u901a\u8fc7\u4f18\u5316\u4efb\u52a1\u5728\u5904\u7406\u5668\u95f4\u7684\u5206\u5e03\uff0c\u63d0\u9ad8\u4e86\u7cfb\u7edf\u7684\u6574\u4f53\u6027\u80fd\u3002<\/p>\n<h2 class=\"wp-block-heading\"><strong>\u7ed3\u8bba<\/strong><\/h2>\n<p>Linux\u8fdb\u7a0b\u8c03\u5ea6\u5668\u662fLinux\u7cfb\u7edf\u516c\u5e73\u3001\u6709\u6548\u5730\u7ba1\u7406\u8d44\u6e90\u7684\u5173\u952e\u7ec4\u6210\u90e8\u5206\u3002\u867d\u7136\u9762\u4e34\u7740\u968f\u7740\u8ba1\u7b97\u73af\u5883\u53d1\u5c55\u800c\u6765\u7684\u6311\u6218\uff0c\u4f46\u662f\u901a\u8fc7\u4e0d\u65ad\u7684\u4f18\u5316\u548c\u6539\u8fdb\uff0cLinux\u8fdb\u7a0b\u8c03\u5ea6\u5668\u4f9d\u7136\u80fd\u591f\u5728\u73b0\u4ee3\u7684\u591a\u6838\u3001\u591a\u7ebf\u7a0b\u73af\u5883\u4e0b\u63d0\u4f9b\u4f18\u5f02\u7684\u6027\u80fd\u3002<\/p>\n<h2 class=\"wp-block-heading\"><strong>\u5ef6\u4f38\u9605\u8bfb<\/strong><\/h2>\n<p>\u5982\u679c\u60a8\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u7684\u5de5\u4f5c\u673a\u5236\u611f\u5174\u8da3\uff0c\u90a3\u4e48\u53ef\u4ee5\u8fdb\u4e00\u6b65\u7814\u7a76\u4e00\u4e0bLinux\u5185\u6838\u7684\u8bbe\u8ba1\u548c\u5b9e\u73b0\uff0c\u5b83\u662f\u5f00\u6e90\u8f6f\u4ef6\u7684\u6770\u51fa\u4ee3\u8868\uff0c\u6df1\u5165\u4e86\u89e3\u5b83\u7684\u8bbe\u8ba1\u601d\u60f3\u548c\u5b9e\u73b0\u65b9\u5f0f\u5bf9\u7406\u89e3\u73b0\u4ee3\u64cd\u4f5c\u7cfb\u7edf\u7684\u5de5\u4f5c\u673a\u5236\u6709\u7740\u91cd\u8981\u7684\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Linux\u8fdb\u7a0b\u8c03\u5ea6\u5668\u662fLinux\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u7684\u4e00\u90e8\u5206\uff0c\u8d1f\u8d23\u51b3\u5b9a\u54ea\u4e2a\u8fdb\u7a0b\u5e94\u8be5\u4f7f\u7528CPU\u7684\u8d44\u6e90\uff0c\u4ee5\u53ca\u4f55\u65f6\u4f7f\u7528\u3002\u5b83\u901a [&hellip;]","protected":false},"author":1,"featured_media":38906,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/38905"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=38905"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/38905\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/38906"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=38905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=38905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=38905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}