共享内存提供了最快的进程间通信方法,因为它以内存传输的速度来处理读写消息。
Shared memory provides the fastest method of interprocess communication, because it processes read and write messages at the speed of memory transfers.
不过,共享内存不为使用它的进程提供任何访问控制。
However, Shared memory does not provide any access control for processes that use it.
在这两者之中,实例都是指后台进程与共享内存的组合。
In both cases an instance is a combination of background processes and Shared memory.
然而,如果两个或更多进程要使用共享内存进行通信,那么它们需要有相同的地址空间,从而限制了它们所能使用的地址。
However, if two or more processes want to communicate using Shared memory, they need to have the same address space, thus limiting the addresses they can utilize.
注意,每个进程可能在其各自的地址空间中映射共享内存区域到不同地址。
Note that each process can map the Shared memory region to different addresses in their respective address Spaces.
邮箱有效地将各个进程彼此分开,而不用共享内存中的变量。
Rather than sharing variables in memory, the mailbox effectively separates distinct processes from each other.
实例实例进程和共享内存;在DB 2中,它还包含一个永久目录结构。
Instance Instance Processes and Shared memory; in DB2, it also includes a permanent directory structure.
共享内存允许多个进程将它们的部分虚地址映射到一个公用的内存区域。
Shared memory allows multiple processes to map a portion of their virtual address to a common memory region.
任何进程都可以向共享内存区域写入数据,并且数据可以由其他进程读取或修改。
Any process can write data to a Shared memory region, and the data are readable and modified by other processes.
放在这个惟一空间内的共享内存段只能被相同内存窗中的进程访问。
Shared memory segments placed in the unique space can only be accessed by processes within the same memory window.
即使在所有进程都与之脱离之后,这个共享内存也不会被销毁。
The Shared memory is not destroyed even after all processes detach from it.
当主进程退出时,并不删除共享内存。
另一个进程将使用这个名称访问这个共享内存。
Another process that accesses this Shared memory will be using this name for the access.
这个程序例子创建了一个与其父进程共享存储器空间的克隆线程。
This example program creates a cloned thread sharing memory space with the parent process.
当一个虚拟进程首次附加到共享内存中时,它读取共享内存头中的地址信息,获取指向其他所有结构的方向。
When a virtual processor first attaches to Shared memory, it reads address information in the shared-memory header for directions to all other structures.
现在让我们来看一下如何使用共享内存和事件的缓存进行进程间通信。
Now let's look at using Shared memory and caching of events for interprocess communications.
在图2中,进程A请求一个共享内存段。
换句话说,操作系统不会强制您通过锁来共享资源,所以,所有需要该资源的进程都必须协同使用该锁。
In other words, the operating system doesn't enforce the resource sharing through the lock, so all processes that need the resource must cooperate to use the lock.
总共享内存增加了 11%,总进程内存增加了 24%。
Total share memory increased 11%, and total process memory increased 24%.
当大型应用程序向内核请求大量内存和多个进程共享内存时,反向映射帮助系统继续有效地运行和扩展。
Reverse mappings help the system continue to perform and scale well when large applications are placing huge memory demands on the kernel and multiple processes are sharing memory.
最后一个有意思的参数就是句柄继承模型了。它允许在必要的时候,可以喝子进程共享资源。
Finally, the other interesting parameter is the handle inheritance model, this will allow to share this resource with a child process if is required.
按照与本地进程内存相同的方式对待共享内存。
The Shared memory is treated the same as local process memory.
进程间通信:进一步了解共享内存和其他进程间通信形式是如何实现的。
Interprocess communications: Learn more about how Shared memory and other forms of interprocess communication are implemented.
但是,在父进程退出之前,它必须释放共享内存。
Before the parent can exit, however, it must free the Shared memory.
顾名思义,共享内存让一段内存可供多个进程访问。
As its name implies, Shared memory makes a segment of memory accessible to more than one process.
这些设施包括打开文件句柄(文件描述符)、共享内存、进程同步原语和当前目录。
Facilities include open file handles (file descriptors), Shared memory, process synchronization primitives, and current directory.
最后,在图4中,进程a和B可以随意读写共享内存段。
Finally, in Figure 4, processes a and B can read and write from the Shared memory segment freely.
因为这个进程要修改共享内存对象的内容,所以使用read _ write。
Because this process modifies the contents of the Shared memory object, you use read_write.
因为bash已在运行,以后运行的任何bash脚本都天生是有效利用内存的,因为它们与任何已运行的bash进程共享内存。
Because bash is already running, any additional bash scripts that you run are inherently memory-efficient because they share memory with any already-running bash processes.
如果资源已经存在,则CreateFileMapping重新初始化共享资源对于进程的约定。
The CreateFileMapping reinitializes the commitment of the Shared resource to the process if the resource already exists.
应用推荐