传统的进程间通信的方式有大致如下几种:(1) 管道(PIPE)(2) 命名管道(FIFO)(3) 信号量(Semphore)(4) 消息队列(MessageQueue)(5) 共享内存(SharedMemory)(6) SocketJava如何支持进程间通信。我们把Java进程理解为JVM进程。很明...
分类:
编程语言 时间:
2014-11-10 19:30:30
阅读次数:
219
alarm(设置信号传送闹钟)相关函数signal,sleep表头文件#include定义函数unsigned int alarm(unsigned int seconds);函数说明alarm()用来设置信号SIGALRM在经过参数seconds指定的秒数后传送给目前的进程。如果参数second....
分类:
其他好文 时间:
2014-11-10 06:25:42
阅读次数:
291
一。select和epoll首先我们来定义流的概念,一个流可以是文件,socket,pipe等等可以进行I/O操作的内核对象。不管是文件,还是套接字,还是管道,我们都可以把他们看作流。通过read,我们可以从流中读入数据;通过write,我们可以往流写入数据。现在假定一个情形,我们需要从流中读数据,...
分类:
其他好文 时间:
2014-11-09 06:15:34
阅读次数:
233
1 /* tingbc.c 2 * use two pipe to execute the bc. 3 * one pipe: todc[2] , another: fromdc[2] 4 * child thread to do dc, parent do UI 5 */ 6 7 #i...
分类:
系统相关 时间:
2014-11-07 22:01:05
阅读次数:
436
程序pipe, 它使用可例如: ./pipe who sort ./pipe ls head 1 /* pipe.c 2 * Demostrates how to create a pipeline from one process to another 3 * * take two args...
分类:
系统相关 时间:
2014-11-06 23:34:02
阅读次数:
353
How to implement a effecitive AE.
AE
ME,MC
Minual exposure //time,line
Max exposure
//average ill help to control it.
Gain
Range
Minimal
Max:
Upper bound://...
分类:
其他好文 时间:
2014-11-06 22:01:41
阅读次数:
237
频繁的I/O操作会引起频繁的系统调用,这会很慢,于是引入缓冲区。对于一个流(文件、socket或pipe),以缓冲区为单位进行操作,举个例子:
一个管道,A写入,B读出,一开始内核缓冲区为空,B阻塞,A开始写入,内核缓冲区状态由空变为非空,这时内核产生一个事件告诉B该醒了。但这个事件并没有让B去读数据,似乎只是起到一个警示,不过内核许诺不会把写入管道中的数据丢掉,A写入的数据会全部保存在缓冲...
分类:
其他好文 时间:
2014-11-05 00:29:09
阅读次数:
202
1. 函数说明pipe(建立管道):1) 头文件 #include2) 定义函数: int pipe(int filedes[2]);3) 函数说明: pipe()会建立管道,并将文件描写叙述词由參数filedes数组返回。 filedes[0]为管道里的读取端 filedes[1]则为管道的写入端...
分类:
系统相关 时间:
2014-11-04 19:13:55
阅读次数:
216
building?‘_imagingft‘?extension?gcc?-pthread?-fno-strict-aliasing?-march=x86-64?-mtune=generic?-O2?-pipe?-fstack-protector?--param=ssp-buffer-size=4?-DNDEBUG?-march=x86-64?-mtune=gene...
分类:
其他好文 时间:
2014-10-31 16:11:08
阅读次数:
128
1. 函数说明pipe(建立管道):1) 头文件 #include2) 定义函数: int pipe(int filedes[2]);3) 函数说明: pipe()会建立管道,并将文件描写叙述词由參数filedes数组返回。 filedes[0]为管道里的读取端 filedes[1]则为管道的写入端...
分类:
系统相关 时间:
2014-10-30 22:23:40
阅读次数:
190