操作系统中2个进程之间传递的双向消息 [英] Bidirectional message passing between 2 processes within an OS

查看:181
本文介绍了操作系统中2个进程之间传递的双向消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PIPES是单向的,在通信中可以是同步的或异步的.

PIPES are unidirectional and can be synchronous or asynchronous in communication.

但是如何创建一个双向命名管道,其中一个进程上的一个端点和另一个进程上的另一个端点都共享相同的内存,并且存在于同一操作系统中并异步通信.

But how to create a Bidirectional Named pipe with one endpoint on one process and the other endpoint on other process both processes sharing the same memory and is present within the same operating system and communicating asynchronously.

有办法吗?

推荐答案

在Linux上,如果您必须使用两个管道需要全双工通信.但是,Solaris具有全双工管道.

On Linux you must use two pipes if you want full duplex communication. Solaris however has full duplex pipes.

听起来,Unix域套接字可以满足您的要求.这样的套接字称为全双工和异步.

It sounds like a Unix-domain socket would satisfy your requirements. Such a socket is named, full duplex and asynchronous.

这篇关于操作系统中2个进程之间传递的双向消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆