when one process creates a new process, the identity of the newly created process is passed to the parent.
当一个进程创建一个新的进程,这个新进程的id传给父母进程。
父母进程可能结束他的孩子进程的原因:
• The child has exceeded its usage of some of the resources that it has been allocated.
孩子进程超额使用它被分配到的资源。
• The task assigned to the child is no longer required.
不再需要分配给孩子进程的任务
• The parent is exiting
父母进程结束
Any process that does not share data with any other process is independent.
任何没有和其他进程共享数据的进程都是独立的
Any process that shares data with other processes is a cooperating process.
任何和其他进程共享数据的进程都是合作进程。
进程需要合作的原因:
• Information sharing.
信息共享
• Computation speedup. Notice that such a speedup can be achieved only if the computer has multiple processing cores.
提高运行速度。注意这样的提示只能在多核环境中实现。
• Modularity.
模块化运行。互不影响其他进程,线程。
• Convenience.
便利。一个用户也会运行多个任务
There are two fundamental models of interprocess communication: shared memory and message passing.
有两个主要的进程间通信的模式:共享内存和信息传递。
In the shared-memory model, a region of memory that is shared by cooperating processes is established.
在共享内存模式中,会确立一个区域的内存被合作进程共享。
Processes can then exchange information by reading and writing data to the shared region.
进程可以通过读取该区域内存交换信息。
In the message-passing model, communication takes place by means of messages exchanged between the cooperating processes.
在信息传递模式,通信任务由合作进程间交换信息完成的。
Message passing is useful for exchanging smaller amounts of data, because no conflicts need be avoided.
在交换小量数据的时候信息传递比较有效,因为不会发生数冲突。
Shared memory can be faster than message passing, since message-passing systems are typically implemented using system calls and thus require the more time-consuming task of kernel intervention.
共享数据模式会比信息传递模式要快,因为信息传递模式需要通过系统调用,就需要kernel干涉,要求更多的时间消耗任务。
In shared-memory systems, system calls are required only to establish shared memory regions.
在数据共享系统中,系统调用只在建立共享数据区域的时候需要。
Once shared memory is established, all accesses are treated as routine memory accesses, and no assistance from the kernel is required.
一旦共享数据建立起来,所有的访问都只是被认为是一般的内存访问,不需要kernel的协助。
Recent research on systems with several processing cores indicates that message passing provides better performance than shared memory on such systems.
最近的研究表明在多核系统环境中,信息传递比共享数据模式提供了更好的性能。
Shared memory suffers from cache coherency issues, which arise because shared data migrate among the several caches.
共享数据模式有缓冲一致性的麻烦,因为数据共享区域会跨多个缓冲。
分享到:
相关推荐
关于IPC很好的资料,最新的第二版,很不容易找到,djvu版本。
但一般说来, 进程间通信(IPC:InterProcess Communication)不包括这种似乎比较低级的通信方法。Unix系统中实现进程间通信的方法很多,而且不幸的是,极少方法能在所有的Unix系 统中进行移植(唯一一种是半双工的...
UNIX Network Programming, Volume 2, Second Edition: Interprocess Communications, source code && read me && Reported problems UNIX网络编程,第2卷(第2版)IPC,源码,read me, Reported problems
An introduction to 4.3 BSD interprocess communication tutorial
现代操作系统课件:Chapter2-Interprocess Communication.ppt
aidl是 Android Interface definition language的缩写,一看就明白,它是一种android内部进程通信接口的描述语言,通过它我们可以定义进程间的通信接口 icp:interprocess communication :内部进程通信
破解版 Create Client/Server applications with powerful InterProcess Communication: Let your Applications cooperate Send and receive Messages, Strings, Stringlists, Arrays, Records and Components ...
UNIX网络编程(第2版) 第2卷 进程间通信
Android_Interprocess_Communication Android 进程间通信与 AIDL + 异步 RPC 参考
ICP:Interprocess Communication ,内部进程通信。 使用: 1、先创建一个aidl文件,aidl文件的定义和java代码类似,但是!它可以引用其它aidl文件中定义的接口和类,但是不能引用自定义的java类文件中定义的接口和类...
IPC(InterProcess Communication)是各种进程通信方式的统称,主要有下面几种类型: 管道 FIFO(命名管道) 消息队列 信号量 共享空间 套接口 前五种IPC只能用于一台主机内的进程间通信,套接口...
第2卷, 进程间通信(中文版)(已故著名技术作家Stevens的传世之作) 基本信息 原书名: UNIX Network Programming, Volume 2: Interprocess Communications (2nd Edition) 原出版社: Prentice Hall 作者: (美)W. ...
linux进程间通信代码部分,Linux环境下,进程地址空间相互独立,每个进程各自有不同的用户地址空间。任何一个进程的全局变量在另一个进程中都看不到,所以进程和进程之间不能相互访问...InterProcess Communication)。
CHAPTER 20:System Programming ll:Interprocess Communication CHAPTER 21:System Programming IV:Practical Considerations CHAPTER 22:UNIXX Window System GUI Basics CHAPTER 23:UNIX System Administration ...
进程间 用于Rust程序的进程间通信工具包。 该板条箱旨在尽可能多地显示特定于平台的功能,同时为所有平台保持统一的界面。特征实现了以下进程间通信原语: 未命名管道-匿名文件状对象,用于在一个方向上私下通信,最...
unix network programming英文第二版,djvu格式,清晰, Richard Stevens
RCF is a portable C++ interprocess communication framework, using native C++ features to provide a new and simplified approach to writing distributed C++ software. RCF builds on the time honored ...
原书名: UNIX Network Programming, Volume 2: Interprocess Communications (2nd Edition) 原出版社: Prentice Hall 作者: (美)W. Richard Stevens