- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
操作系统课件CCH04-Process
4.8 Complexity and Computer Engineering Software applications have grown more and more complex. An application cannot consist of only one process taking care of everything. Applications consist of several processes cooperating with one another. Independent vs cooperating processes Independent processes do not affect, and are not affected by, other processes. Cooperating processes do affect and can be affected by other processes. Cooperating “organs” But for cooperation…the OS has to provide for… Communication facilities between cooperating processes. The OS is responsible for providing those services. IPC services. For cooperation there must be coordination…synchronization! Again it’s the responsibility of the OS to provide those synchronization mechanisms. Interprocess Communication (IPC) The OS must provide the mechanisms for communication among processes. (a) Shared memory! (b) Message passing. Shared memory It is fast! (advantage). But… It breaks the protected memory scheme and must be requested explicitly by the processes. AP must manage SM. AP must supply the protection and synchronization for the use of SM. Message passing More general than Shared Memory (it works on distributed systems too!) The sending process creates a message in its own address space. The OS transfer that message to the address space of the receiver process. Message passing MP is usually implemented in two mechanisms: send(message); receive(message); When two processes want to “talk” they need to request a communication link to… …the OS, of course! Design issues Naming or addressing: How do sender and receiver identify themselves? Synchronization: Do processes continue after a send or a receive? Buffering: How many messages fit in the buffer? Exceptions: When an error occurs, how can the process recover? Direct Commu-nication Processes name each other send(P, message) receive(Q, message) Send message to process P, receive message from process Q. Convenient when one-to-one communica
文档评论(0)