{"id":156180,"date":"2019-08-28T11:30:46","date_gmt":"2019-08-28T03:30:46","guid":{"rendered":"https:\/\/gulass.cn\/?p=156180"},"modified":"2019-08-27T14:21:23","modified_gmt":"2019-08-27T06:21:23","slug":"linux-system-programming","status":"publish","type":"post","link":"https:\/\/gulass.cn\/linux-system-programming.html","title":{"rendered":"Linux\u7cfb\u7edf\u7f16\u7a0b\u4e4b\u8fdb\u7a0b\u4ecb\u7ecd"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u6211\u4eec\u5e73\u65f6\u5199\u7684 C \u8bed\u8a00\u4ee3\u7801\uff0c\u901a\u8fc7\u7f16\u8bd1\u5668\u7f16\u8bd1\uff0c\u6700\u7ec8\u5b83\u4f1a\u6210\u4e3a\u4e00\u4e2a\u53ef\u6267\u884c\u7a0b\u5e8f\uff0c\u5f53\u8fd9\u4e2a\u53ef\u6267\u884c\u7a0b\u5e8f\u8fd0\u884c\u8d77\u6765\u540e\uff08\u6ca1\u6709\u7ed3\u675f\u4e4b\u524d\uff09\uff0c\u5b83\u5c31\u6210\u4e3a\u4e86\u4e00\u4e2a\u8fdb\u7a0b\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u4e00\u3001\u8fdb\u7a0b\u6982\u8ff0<\/strong><\/div>\n \u6211\u4eec\u5e73\u65f6\u5199\u7684 C \u8bed\u8a00\u4ee3\u7801\uff0c\u901a\u8fc7\u7f16\u8bd1\u5668\u7f16\u8bd1\uff0c\u6700\u7ec8\u5b83\u4f1a\u6210\u4e3a\u4e00\u4e2a\u53ef\u6267\u884c\u7a0b\u5e8f\uff0c\u5f53\u8fd9\u4e2a\u53ef\u6267\u884c\u7a0b\u5e8f\u8fd0\u884c\u8d77\u6765\u540e\uff08\u6ca1\u6709\u7ed3\u675f\u4e4b\u524d\uff09\uff0c\u5b83\u5c31\u6210\u4e3a\u4e86\u4e00\u4e2a\u8fdb\u7a0b\u3002 \u4e8c\u3001\u8fdb\u7a0b\u72b6\u6001<\/strong><\/div>\n \u6211\u4eec\u73b0\u5728\u7684\u7535\u8111\u57fa\u672c\u4e0a\u90fd\u662f\u591a\u4efb\u52a1\uff0c\u6211\u4eec\u804a\u7740 QQ \u7684\u65f6\u5019\uff0c\u540c\u65f6\u53ef\u4ee5\u770b\u7740\u89c6\u9891\uff0c\u8fd9\u91cc\u76f8\u5f53\u4e8e QQ \u548c\u89c6\u9891\u4e24\u4e2a\u7a0b\u5e8f\u540c\u65f6\u8fd0\u884c\u7740\uff08\u4e24\u4e2a\u8fdb\u7a0b\uff09\u3002\u65e9\u671f\u7684\u65f6\u5019\uff0c\u7535\u8111\u7684 CPU \u662f\u5355\u6838\u7684\uff08\u5355\u6838\u7406\u8bba\u4e0a\u53ea\u8fd0\u884c\u64cd\u4f5c\u4e00\u4e2a\u4efb\u52a1\uff09\uff0c\u90a3\u5b83\u662f\u5982\u4f55\u505a\u5230\u591a\u4efb\u52a1\u7684\u5462\uff1f\u8fd9\u5c31\u6d89\u53ca\u5230\u8fdb\u7a0b\u7684\u8c03\u5ea6\u7b56\u7565\u3002\u73b0\u5728\u7ed9\u5927\u5bb6\u4e3e\u8fd9\u4e48\u4e00\u4e2a\u4f8b\u5b50\uff0c\u6709 A\uff0cB\uff0cC \u4e09\u4e2a\u8fdb\u7a0b\uff0c\u5728\u6211\u4eec\u5355 CPU \u7684\u60c5\u51b5\u4e0b\uff0c\u6bcf\u4e00\u4e2a\u65f6\u523b\u53ea\u6709\u4e00\u4e2a\u8fdb\u7a0b\u5728\u8fd0\u884c\uff0c\u5982\u679c A \u8fd0\u884c\u5b8c\uff0cB \u8fd0\u884c\uff0cB \u8fd0\u884c\u5b8c\uff0cC \u8fd0\u884c\uff0cC \u8fd0\u884c\u5b8c\uff0cA \u8fd0\u884c\uff0c\u800c CPU \u7684\u8fd0\u7b97\u901f\u5ea6\u8db3\u591f\u5feb\uff0cA \u4e24\u6b21\u8fd0\u884c\u65f6\u95f4\u95f4\u9694\u8db3\u591f\u77ed\uff0c\u4ece\u5b8f\u89c2\u4e0a\u5c31\u6211\u4eec\u5c31\u770b\u5230 A\uff0cB\uff0cC \u597d\u50cf\u540c\u65f6\u8fd0\u884c\uff0c\u8fd9\u5c31\u662f\u5b9e\u73b0\u5355 CPU \u8fd0\u884c\u591a\u4e2a\u4efb\u52a1\u7684\u6838\u5fc3\u539f\u7406\uff0c\u901a\u8fc7\u65f6\u95f4\u7247\u8f6e\u8be2\u8c03\u5ea6\u7b56\u7565\u5b9e\u73b0\u591a\u4efb\u52a1\uff08\u66f4\u591a\u8be6\u60c5\uff0c\u8bf7\u770b\u300aLinux \u8fdb\u7a0b\u8c03\u5ea6\u6d45\u6790\u300b\uff09\u3002 \u5c31\u7eea\u6001\uff1a<\/strong><\/span><\/div>\n \u8fdb\u7a0b\u5df2\u7ecf\u5177\u5907\u6267\u884c\u7684\u4e00\u5207\u6761\u4ef6\uff0c\u6b63\u5728\u7b49\u5f85\u5206\u914d CPU \u7684\u5904\u7406\u65f6\u95f4\u3002<\/p>\n \u6267\u884c\u6001\uff1a<\/strong><\/span><\/div>\n \u8be5\u8fdb\u7a0b\u6b63\u5728\u5360\u7528 CPU \u8fd0\u884c\u3002<\/p>\n \u7b49\u5f85\u6001\uff1a<\/strong><\/span><\/div>\n \u8fdb\u7a0b\u56e0\u4e0d\u5177\u5907\u67d0\u4e9b\u6267\u884c\u6761\u4ef6\u800c\u6682\u65f6\u65e0\u6cd5\u7ee7\u7eed\u6267\u884c\u7684\u72b6\u6001\u3002 \u6267\u884c\u6001-->\u7b49\u5f85\u6001\uff1a<\/strong><\/span><\/div>\n \u6b63\u5728\u6267\u884c\u7684\u8fdb\u7a0b\u56e0\u7b49\u5f85\u67d0\u79cd\u4e8b\u4ef6\u53d1\u751f\u800c\u65e0\u6cd5\u7ee7\u7eed\u6267\u884c\u65f6\uff0c\u4fbf\u4ece\u6267\u884c\u72b6\u6001\u53d8\u6210\u7b49\u5f85\u72b6\u6001<\/p>\n \u7b49\u5f85\u6001-->\u5c31\u7eea\u6001\uff1a<\/strong><\/span><\/div>\n \u5904\u4e8e\u7b49\u5f85\u6001\u7684\u8fdb\u7a0b\uff0c\u82e5\u5176\u7b49\u5f85\u7684\u4e8b\u4ef6\u53d1\u751f\uff0c\u4e8e\u662f\u8fdb\u7a0b\u7531\u7b49\u5f85\u72b6\u6001\u53d8\u6210\u5c31\u7eea\u6001<\/p>\n \u5c31\u7eea\u6001-->\u6267\u884c\u6001\uff1a<\/strong><\/span><\/div>\n \u5f53\u5c31\u7eea\u6001\u7684\u8fdb\u7a0b\u6240\u7b49\u5f85\u7684cpu\u65f6\u95f4\u7247\u4e00\u5230\u6765\uff0c\u8fdb\u7a0b\u5c31\u4f1a\u4ece\u5c31\u7eea\u6001\u53d8\u6210\u6267\u884c\u6001<\/p>\n \u6267\u884c\u6001-->\u5c31\u7eea\u6001\uff1a<\/strong><\/span><\/div>\n \u5904\u4e8e\u6267\u884c\u72b6\u6001\u7684\u8fdb\u7a0b\u5728\u5176\u6267\u884c\u8fc7\u7a0b\u4e2d\uff0c\u56e0\u5206\u914d\u7ed9\u5b83\u7684\u4e00\u4e2a\u65f6\u95f4\u7247\u5df2\u7528\u5b8c\u800c\u4e0d\u5f97\u4e0d\u8ba9\u51facpu\uff0c\u4e8e\u662f\u8fdb\u7a0b\u4ece\u6267\u884c\u72b6\u6001\u8f6c\u53d8\u6210\u5c31\u7eea\u72b6\u6001 \u4e09\u3001\u8fdb\u7a0b\u63a7\u5236\u5757<\/strong><\/div>\n \u5bf9\u4e8e\u64cd\u4f5c\u7cfb\u7edf\u800c\u8a00\uff0c\u5b83\u9700\u8981\u63a7\u5236\u5f88\u591a\u8fdb\u7a0b\uff0c\u540c\u65f6\uff0c\u6bcf\u4e2a\u8fdb\u7a0b\u90fd\u6709\u4e0d\u540c\u7684\u72b6\u6001\uff0c\u7cfb\u7edf\u5982\u4f55\u77e5\u9053 A \u6267\u884c\u5b8c\u5230 B \u6267\u884c\u800c\u4e0d\u662f C\uff1f\u7cfb\u7edf\u5982\u4f55\u534f\u8c03\u63a7\u5236\u8fdb\u7a0b\u5462\uff1f \u56db\u3001\u8fdb\u7a0b\u53f7<\/strong><\/div>\n \u6bcf\u4e2a\u8fdb\u7a0b\u90fd\u7531\u4e00\u4e2a\u8fdb\u7a0b\u53f7\u6765\u6807\u8bc6\uff0c\u5176\u7c7b\u578b\u4e3a pid_t\uff08\u65e0\u7b26\u53f7\u6574\u578b\uff09\uff0c\u8fdb\u7a0b\u53f7\u7684\u8303\u56f4\uff1a0\uff5e32767\u3002\u8fdb\u7a0b\u53f7\u603b\u662f\u552f\u4e00\u7684\uff0c\u4f46\u8fdb\u7a0b\u53f7\u53ef\u4ee5\u91cd\u7528\u3002\u5f53\u4e00\u4e2a\u8fdb\u7a0b\u7ec8\u6b62\u540e\uff0c\u5176\u8fdb\u7a0b\u53f7\u5c31\u53ef\u4ee5\u518d\u6b21\u4f7f\u7528\u3002 \u4e94\u3001\u8fdb\u7a0b\u53f7\u64cd\u4f5c\u51fd\u6570<\/strong><\/div>\n Linux \u64cd\u4f5c\u7cfb\u7edf\u63d0\u4f9b\u4e86\u4e09\u4e2a\u83b7\u5f97\u8fdb\u7a0b\u53f7\u7684\u51fd\u6570 \u529f\u80fd\uff1a \u529f\u80fd\uff1a\u83b7\u53d6\u8c03\u7528\u6b64\u51fd\u6570\u7684\u8fdb\u7a0b\u7684\u7236\u8fdb\u7a0b\u53f7\uff08PPID\uff09 \u529f\u80fd\uff1a\u83b7\u53d6\u8fdb\u7a0b\u7ec4\u53f7\uff08PGID\uff09 \u8fd0\u884c\u7ed3\u679c\uff1a \u6211\u4eec\u5e73\u65f6\u5199\u7684 C \u8bed\u8a00\u4ee3\u7801\uff0c\u901a\u8fc7\u7f16\u8bd1\u5668\u7f16\u8bd1\uff0c\u6700\u7ec8\u5b83\u4f1a\u6210\u4e3a\u4e00\u4e2a\u53ef\u6267\u884c\u7a0b\u5e8f\uff0c\u5f53\u8fd9\u4e2a\u53ef\u6267\u884c\u7a0b\u5e8f\u8fd0\u884c\u8d77\u6765\u540e\uff08\u6ca1\u6709\u7ed3\u675f\u4e4b […]<\/p>\n","protected":false},"author":1893,"featured_media":156181,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-156180","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/156180","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\/1893"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=156180"}],"version-history":[{"count":1,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/156180\/revisions"}],"predecessor-version":[{"id":156184,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/156180\/revisions\/156184"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/156181"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=156180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=156180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=156180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}} |