{"id":328,"date":"2014-09-14T18:23:44","date_gmt":"2014-09-14T10:23:44","guid":{"rendered":"http:\/\/www.ipcpu.com\/?p=328"},"modified":"2014-09-14T18:23:44","modified_gmt":"2014-09-14T10:23:44","slug":"os-process-manage","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2014\/09\/os-process-manage\/","title":{"rendered":"\u64cd\u4f5c\u7cfb\u7edf-\u8fdb\u7a0b\u7ba1\u7406"},"content":{"rendered":"

\u64cd\u4f5c\u7cfb\u7edf-\u8fdb\u7a0b\u7ba1\u7406<\/h2>\n

\u8fdb\u7a0b\u7684\u5b9a\u4e49<\/h3>\n

\u8fdb\u7a0b\u662f\u7a0b\u5e8f\u5904\u4e8e\u4e00\u4e2a\u6267\u884c\u73af\u5883\u4e2d\u5728\u4e00\u4e2a\u6570\u636e\u96c6\u4e0a\u7684\u8fd0\u884c\u8fc7\u7a0b\uff0c\u5b83\u662f\u7cfb\u7edf\u8fdb\u884c\u8d44\u6e90\u5206\u914d\u548c\u8c03\u5ea6\u7684\u4e00\u4e2a\u53ef\u5e76\u53d1\u6267\u884c\u7684\u72ec\u7acb\u5355\u4f4d\u3002
\n\u8fdb\u7a0b\u662f\u7a0b\u5e8f\u7684\u4e00\u6b21\u6267\u884c\uff0c\u8be5\u8fdb\u7a0b\u53ef\u4e0e\u5176\u5b83\u8fdb\u7a0b\u5e76\u53d1\u6267\u884c\uff1b\u5b83\u662f\u4e00\u4e2a\u52a8\u6001\u7684\u5b9e\u4f53\uff0c\u5728\u4f20\u7edf\u7684\u64cd\u4f5c\u7cfb\u7edf\u8bbe\u8ba1\u4e2d\uff0c\u8fdb\u7a0b\u65e2\u662f\u8d44\u6e90\u7684\u57fa\u672c\u5206\u914d\u5355\u5143\uff0c\u4e5f\u662f\u57fa\u672c\u7684\u6267\u884c\u5355\u5143\u3002<\/p>\n

\u8fdb\u7a0b\u4e0e\u7a0b\u5e8f\u7684\u533a\u522b\u548c\u8054\u7cfb<\/h3>\n

\uff081\uff09\u7a0b\u5e8f\u662f\u9759\u6001\u7684\uff0c\u8fdb\u7a0b\u662f\u52a8\u6001\u7684\u3002\u7a0b\u5e8f\u662f\u6709\u5e8f\u4ee3\u7801\u7684\u96c6\u5408\uff1b\u8fdb\u7a0b\u662f\u7a0b\u5e8f\u7684\u4e00\u6b21\u6267\u884c\u3002
\n\uff082\uff09\u8fdb\u7a0b\u662f\u6682\u65f6\u7684\uff0c\u7a0b\u5e8f\u7684\u6c38\u4e45\u7684\u3002\u8fdb\u7a0b\u662f\u4e00\u4e2a\u53d8\u5316\u7684\u8fc7\u7a0b\uff0c\u6709\u751f\u547d\u5468\u671f\uff0c\u6682\u65f6\u5b58\u5728\uff0c\u7a0b\u5e8f\u6ca1\u6709\u751f\u547d\u5468\u671f\uff0c\u53ef\u957f\u4e45\u4fdd\u5b58\u3002
\n\uff083\uff09\u8fdb\u7a0b\u8fd8\u662f\u64cd\u4f5c\u7cfb\u7edf\u8d44\u6e90\u5206\u914d\u548c\u4fdd\u62a4\u7684\u57fa\u672c\u5355\u4f4d\uff0c\u7a0b\u5e8f\u6ca1\u6709\u6b64\u529f\u80fd\u3002
\n\uff084\uff09\u8fdb\u7a0b\u4e0e\u7a0b\u5e8f\u7684\u5bf9\u5e94\u5173\u7cfb\u3002\u901a\u8fc7\u591a\u6b21\u6267\u884c\uff0c\u4e00\u4e2a\u7a0b\u5e8f\u53ef\u5bf9\u5e94\u591a\u4e2a\u8fdb\u7a0b\uff1b\u901a\u8fc7\u8c03\u7528\u5173\u7cfb\uff0c\u4e00\u4e2a\u8fdb\u7a0b\u53ef\u5305\u62ec\u591a\u4e2a\u7a0b\u5e8f\u3002
\n\uff085\uff09\u8fdb\u7a0b\u4e0e\u7a0b\u5e8f\u7684\u7ed3\u6784\u4e0d\u540c\u3002<\/p>\n

\u8fdb\u7a0b\u7684\u7ec4\u6210<\/h3>\n

\"\"<\/p>\n

\u8fdb\u7a0b\u7684\u72b6\u6001<\/h3>\n

\u4e09\u79cd\u8fdb\u7a0b\u72b6\u6001\u5207\u6362
\n\"\"
\n\u4e94\u79cd\u8fdb\u7a0b\u72b6\u6001\u5207\u6362
\n\"\"
\n\u4e03\u79cd\u8fdb\u7a0b\u72b6\u6001\u5207\u6362
\n\"\"<\/p>\n

\u8fdb\u7a0b\u8c03\u5ea6<\/h3>\n

\u5c31\u662f\u6309\u7167\u4e00\u5b9a\u7684\u7b97\u6cd5\uff0c\u4ece\u5c31\u7eea\u961f\u5217\u4e2d\u9009\u62e9\u67d0\u4e2a\u8fdb\u7a0b\u5360\u7528CPU\u7684\u65b9\u6cd5\u2014\u2014\u5bf9CPU\u8d44\u6e90\u8fdb\u884c\u5408\u7406\u7684\u5206\u914d\u4f7f\u7528\uff0c\u4ee5\u63d0\u9ad8\u5904\u7406\u673a\u5229\u7528\u7387\uff0c\u5e76\u4f7f\u5404\u8fdb\u7a0b\u516c\u5e73\u5f97\u5230\u5904\u7406\u673a\u8d44\u6e90\u3002<\/p>\n

\u8fdb\u7a0b\u8c03\u5ea6\u7b97\u6cd5<\/h3>\n

1.\u5148\u5230\u5148\u670d\u52a1\u8c03\u5ea6 First-Come, First-Served Scheduling (FCFS)
\n2.\u57fa\u4e8e\u4f18\u5148\u7ea7\u8c03\u5ea6 Priority Scheduling
\n3.\u6700\u77ed\u4f5c\u4e1a\u4f18\u5148\u8c03\u5ea6 Shortest-Job-First Scheduling (SJF)
\n4.\u5faa\u73af\u8c03\u5ea6 Round-Robin Scheduling (RR)
\n5.\u591a\u5c42\u6b21\u961f\u5217\u8c03\u5ea6 Multilevel Queue Scheduling<\/p>\n

\u8fdb\u7a0b\u95f4\u7684\u901a\u4fe1\uff08IPC\uff09<\/h3>\n

\u7ba1\u9053\uff08pipe\uff09
\n\u547d\u540d\u7ba1\u9053\uff08named pipe\uff09
\n\u4fe1\u53f7\uff08signal\uff09
\n\u6d88\u606f\u961f\u5217\uff08message queue\uff09
\n\u5171\u4eab\u5185\u5b58\uff08shared memory\uff09
\n\u4fe1\u53f7\u91cf\uff08semaphore\uff09
\n\u5957\u63a5\u5b57\uff08socket\uff09<\/p>\n

\u7ebf\u7a0b\uff08thread\uff09<\/h3>\n

\u7ebf\u7a0b(thread)\u4e5f\u53eb\u8f7b\u578b\u8fdb\u7a0b\uff0c\u662f\u4e00\u4e2a\u53ef\u6267\u884c\u7684\u5b9e\u4f53\u5355\u5143\u3002\u5b83\u4ee3\u66ff\u4ee5\u5f80\u7684\u8fdb\u7a0b\uff0c\u6210\u4e3a\u73b0\u4ee3\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u5904\u7406\u673a\u8c03\u5ea6\u7684\u57fa\u672c\u5355\u4f4d\u3002
\n\"\"
\n1\u3001\u7ebf\u7a0b\u662f\u8fdb\u7a0b\u7684\u4e00\u4e2a\u7ec4\u6210\u90e8\u5206\uff0c\u7ebf\u7a0b\u7531\u8fdb\u7a0b\u521b\u5efa\uff0c\u56e0\u6b64\u4e00\u4e2a\u8fdb\u7a0b\u4e2d\u81f3\u5c11\u5b58\u5728\u4e00\u4e2a\u7ebf\u7a0b\uff0c\u7ebf\u7a0b\u8fd8\u53ef\u4ee5\u521b\u5efa\u5176\u5b83\u7ebf\u7a0b\u3002
\n2\u3001\u8fdb\u7a0b\u4f9d\u7136\u662f\u8d44\u6e90\u5206\u914d\u548c\u4fdd\u62a4\u7684\u57fa\u672c\u5355\u4f4d\uff0c\u7ebf\u7a0b\u53ea\u80fd\u5728\u8fdb\u7a0b\u7684\u5730\u5740\u7a7a\u95f4\u6d3b\u52a8\uff0c\u7ebf\u7a0b\u53ea\u80fd\u4f7f\u7528\u5176\u6240\u5728\u8fdb\u7a0b\u7684\u8d44\u6e90\u3002<\/p>\n

\u6765\u81ea\u4e3a\u77e5\u7b14\u8bb0(Wiz)<\/a><\/div>\n

\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » \u64cd\u4f5c\u7cfb\u7edf-\u8fdb\u7a0b\u7ba1\u7406<\/a><\/p>","protected":false},"excerpt":{"rendered":"

\u64cd\u4f5c\u7cfb\u7edf-\u8fdb\u7a0b\u7ba1\u7406 \u8fdb\u7a0b\u7684\u5b9a\u4e49 \u8fdb\u7a0b\u662f\u7a0b\u5e8f\u5904\u4e8e\u4e00\u4e2a\u6267\u884c\u73af\u5883\u4e2d\u5728\u4e00\u4e2a\u6570\u636e\u96c6\u4e0a\u7684\u8fd0\u884c\u8fc7\u7a0b\uff0c\u5b83\u662f\u7cfb\u7edf\u8fdb\u884c\u8d44\u6e90\u5206\u914d\u548c\u8c03\u5ea6\u7684\u4e00\u4e2a\u53ef\u5e76\u53d1\u6267\u884c\u7684\u72ec\u7acb\u5355\u4f4d\u3002 \u8fdb\u7a0b\u662f\u7a0b\u5e8f\u7684\u4e00\u6b21\u6267\u884c\uff0c\u8be5\u8fdb\u7a0b\u53ef\u4e0e\u5176\u5b83\u8fdb\u7a0b\u5e76\u53d1\u6267\u884c\uff1b\u5b83\u662f\u4e00\u4e2a\u52a8\u6001\u7684\u5b9e\u4f53\uff0c\u5728\u4f20\u7edf\u7684\u64cd\u4f5c\u7cfb\u7edf\u8bbe\u8ba1\u4e2d\uff0c\u8fdb\u7a0b\u65e2\u662f\u8d44\u6e90\u7684\u57fa\u672c\u5206\u914d\u5355\u5143\uff0c\u4e5f\u662f\u57fa\u672c\u7684\u6267\u884c\u5355\u5143\u3002 \u8fdb\u7a0b\u4e0e\u7a0b\u5e8f\u7684\u533a\u522b\u548c\u8054\u7cfb \uff081\uff09\u7a0b\u5e8f\u662f\u9759\u6001\u7684\uff0c\u8fdb\u7a0b\u662f\u52a8\u6001\u7684\u3002\u7a0b\u5e8f\u662f\u6709\u5e8f\u4ee3\u7801\u7684\u96c6\u5408\uff1b\u8fdb\u7a0b\u662f\u7a0b\u5e8f\u7684\u4e00\u6b21\u6267\u884c\u3002 \uff082\uff09\u8fdb\u7a0b\u662f\u6682\u65f6\u7684\uff0c\u7a0b\u5e8f\u7684\u6c38\u4e45\u7684\u3002\u8fdb\u7a0b\u662f\u4e00\u4e2a\u53d8\u5316\u7684\u8fc7\u7a0b\uff0c\u6709\u751f\u547d\u5468\u671f\uff0c\u6682\u65f6\u5b58\u5728\uff0c\u7a0b\u5e8f\u6ca1\u6709\u751f\u547d\u5468\u671f\uff0c\u53ef\u957f\u4e45\u4fdd\u5b58\u3002 \uff083\uff09\u8fdb\u7a0b\u8fd8\u662f\u64cd\u4f5c\u7cfb\u7edf\u8d44\u6e90\u5206\u914d\u548c\u4fdd\u62a4\u7684\u57fa\u672c\u5355\u4f4d\uff0c\u7a0b\u5e8f\u6ca1\u6709\u6b64\u529f\u80fd\u3002 \uff084\uff09\u8fdb\u7a0b\u4e0e\u7a0b\u5e8f\u7684\u5bf9\u5e94\u5173\u7cfb\u3002\u901a\u8fc7\u591a\u6b21\u6267\u884c\uff0c\u4e00\u4e2a\u7a0b\u5e8f\u53ef\u5bf9\u5e94\u591a\u4e2a\u8fdb\u7a0b\uff1b\u901a\u8fc7\u8c03\u7528\u5173\u7cfb\uff0c\u4e00\u4e2a\u8fdb\u7a0b\u53ef\u5305\u62ec\u591a\u4e2a\u7a0b\u5e8f\u3002 \uff085\uff09\u8fdb\u7a0b\u4e0e\u7a0b\u5e8f\u7684\u7ed3\u6784\u4e0d\u540c\u3002 \u8fdb\u7a0b\u7684\u7ec4\u6210 \u8fdb\u7a0b\u7684\u72b6\u6001 \u4e09\u79cd\u8fdb\u7a0b\u72b6\u6001\u5207\u6362 \u4e94\u79cd\u8fdb\u7a0b\u72b6\u6001\u5207\u6362 \u4e03\u79cd\u8fdb\u7a0b\u72b6\u6001\u5207\u6362 \u8fdb\u7a0b\u8c03\u5ea6 \u5c31\u662f\u6309\u7167\u4e00\u5b9a\u7684\u7b97\u6cd5\uff0c\u4ece\u5c31\u7eea\u961f\u5217\u4e2d\u9009\u62e9\u67d0\u4e2a\u8fdb\u7a0b\u5360\u7528CPU\u7684\u65b9\u6cd5\u2014\u2014\u5bf9CPU\u8d44\u6e90\u8fdb\u884c\u5408\u7406\u7684\u5206\u914d\u4f7f\u7528\uff0c\u4ee5\u63d0\u9ad8\u5904\u7406\u673a\u5229\u7528\u7387\uff0c\u5e76\u4f7f\u5404\u8fdb\u7a0b\u516c\u5e73\u5f97\u5230\u5904\u7406\u673a\u8d44\u6e90\u3002 \u8fdb\u7a0b\u8c03\u5ea6\u7b97\u6cd5 1.\u5148\u5230\u5148\u670d\u52a1\u8c03\u5ea6 First-Come, First-Served Scheduling (FCFS) 2.\u57fa\u4e8e\u4f18\u5148\u7ea7\u8c03\u5ea6 Priority Scheduling 3.\u6700\u77ed\u4f5c\u4e1a\u4f18\u5148\u8c03\u5ea6 Shortest-Job-First Scheduling (SJF) 4.\u5faa\u73af\u8c03\u5ea6 Round-Robin Scheduling (RR) 5.\u591a\u5c42\u6b21\u961f\u5217\u8c03\u5ea6 Multilevel Queue Scheduling \u8fdb\u7a0b\u95f4\u7684\u901a\u4fe1\uff08IPC\uff09 \u7ba1\u9053\uff08pipe\uff09 \u547d\u540d\u7ba1\u9053\uff08named pipe\uff09 \u4fe1\u53f7\uff08signal\uff09 \u6d88\u606f\u961f\u5217\uff08message queue\uff09 \u5171\u4eab\u5185\u5b58\uff08shared memory\uff09 \u4fe1\u53f7\u91cf\uff08semaphore\uff09 \u5957\u63a5\u5b57\uff08socket\uff09 \u7ebf\u7a0b\uff08thread\uff09 \u7ebf\u7a0b(thread)\u4e5f\u53eb\u8f7b\u578b\u8fdb\u7a0b\uff0c\u662f\u4e00\u4e2a\u53ef\u6267\u884c\u7684\u5b9e\u4f53\u5355\u5143\u3002\u5b83\u4ee3\u66ff\u4ee5\u5f80\u7684\u8fdb\u7a0b\uff0c\u6210\u4e3a\u73b0\u4ee3\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u5904\u7406\u673a\u8c03\u5ea6\u7684\u57fa\u672c\u5355\u4f4d\u3002 1\u3001\u7ebf\u7a0b\u662f\u8fdb\u7a0b\u7684\u4e00\u4e2a\u7ec4\u6210\u90e8\u5206\uff0c\u7ebf\u7a0b\u7531\u8fdb\u7a0b\u521b\u5efa\uff0c\u56e0\u6b64\u4e00\u4e2a\u8fdb\u7a0b\u4e2d\u81f3\u5c11\u5b58\u5728\u4e00\u4e2a\u7ebf\u7a0b\uff0c\u7ebf\u7a0b\u8fd8\u53ef\u4ee5\u521b\u5efa\u5176\u5b83\u7ebf\u7a0b\u3002 2\u3001\u8fdb\u7a0b\u4f9d\u7136\u662f\u8d44\u6e90\u5206\u914d\u548c\u4fdd\u62a4\u7684\u57fa\u672c\u5355\u4f4d\uff0c\u7ebf\u7a0b\u53ea\u80fd\u5728\u8fdb\u7a0b\u7684\u5730\u5740\u7a7a\u95f4\u6d3b\u52a8\uff0c\u7ebf\u7a0b\u53ea\u80fd\u4f7f\u7528\u5176\u6240\u5728\u8fdb\u7a0b\u7684\u8d44\u6e90\u3002 \u6765\u81ea\u4e3a\u77e5\u7b14\u8bb0(Wiz) \u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,13],"tags":[17,27],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/328"}],"collection":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/comments?post=328"}],"version-history":[{"count":0,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/328\/revisions"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}