[转载] 写程序 通讯 的 API (IPC )# Unix - 噫吁兮,危乎高哉
c*n
1 楼
【 以下文字转载自 THU 讨论区 】
【 原文由 creation 所发表 】
要交project,
本来觉得很简单的问题,想着半天就应该做出来,
可逐渐发现现有的 packages 都不完全合适
a distributed algorithm protocol implementation
3 phase commit,
I need to show the effect of message delay ,so
I need to introduce artificial delay to real API xxx_send
I do this by spawning a POSIX thread, and then
do usleep() and XXX_send in that thread,
I use PVM for different processes, this is an overkill
but very easy to use because PVM has timed recv, ( I need timeout
in the protocol, and i
【 原文由 creation 所发表 】
要交project,
本来觉得很简单的问题,想着半天就应该做出来,
可逐渐发现现有的 packages 都不完全合适
a distributed algorithm protocol implementation
3 phase commit,
I need to show the effect of message delay ,so
I need to introduce artificial delay to real API xxx_send
I do this by spawning a POSIX thread, and then
do usleep() and XXX_send in that thread,
I use PVM for different processes, this is an overkill
but very easy to use because PVM has timed recv, ( I need timeout
in the protocol, and i