linux-ipcs-master
所属分类:其他
开发工具:C/C++
文件大小:45KB
下载次数:1
上传日期:2019-05-13 18:47:10
上 传 者:
shullg
说明: 其中信号(signal)和信号量(semaphore)本质上并不算是进程间通信方式,应该是进程间同步的方式,但是也可以起到一定的通信作用,故也列在上面。
另外普通的mutex是作用线程间同步用的,但是可以将进程A和进程B共享的内存中初始化一个mutex,这样就可以用将此mutex用作进程间通信用了
(Signal and semaphore are not inter-process communication in essence, but should be synchronized between processes, but they can also play a certain role in communication, so they are listed above.
In addition, ordinary mutex is used to synchronize threads, but a mutex can be initialized in the memory shared by process A and process B, so that this mutex can be used for inter-process communication.)
文件列表:
IPC_mutex (0, 2018-06-12)
IPC_mutex\Makefile (409, 2018-06-12)
IPC_mutex\debug.c (1367, 2018-06-12)
IPC_mutex\debug.h (1281, 2018-06-12)
IPC_mutex\main.c (949, 2018-06-12)
IPC_mutex\main_good.c (2600, 2018-06-12)
LICENSE (18027, 2018-06-12)
POSIX_sem (0, 2018-06-12)
POSIX_sem\Makefile (395, 2018-06-12)
POSIX_sem\debug.c (1367, 2018-06-12)
POSIX_sem\debug.h (1281, 2018-06-12)
POSIX_sem\multi_processes_sem (13540, 2018-06-12)
POSIX_sem\multi_threads_sem (13399, 2018-06-12)
POSIX_sem\process_sem.c (1124, 2018-06-12)
POSIX_sem\thread_sem.c (552, 2018-06-12)
XSI_msgq (0, 2018-06-12)
XSI_msgq\Makefile (322, 2018-06-12)
XSI_msgq\debug.c (1367, 2018-06-12)
XSI_msgq\debug.h (1281, 2018-06-12)
XSI_msgq\main.c (1563, 2018-06-12)
XSI_sem (0, 2018-06-12)
XSI_sem\Makefile (390, 2018-06-12)
XSI_sem\debug.c (1367, 2018-06-12)
XSI_sem\debug.h (1281, 2018-06-12)
XSI_sem\main.c (2107, 2018-06-12)
XSI_shm (0, 2018-06-12)
XSI_shm\Makefile (322, 2018-06-12)
XSI_shm\debug.c (1367, 2018-06-12)
XSI_shm\debug.h (1281, 2018-06-12)
XSI_shm\main.c (1379, 2018-06-12)
domain_socket (0, 2018-06-12)
domain_socket\Makefile (236, 2018-06-12)
... ...
# linux-IPCs
Linux进程间通信方式汇总
# 目前已包含的方式
1. 管道(PIPE)
2. FIFO(有名管道)
3. XSI消息队列
4. XSI信号量
5. XSI共享内存
6. POSIX信号量
7. 域套接字(Domain Socket)
8. 信号(Signal)
9. 互斥量(Mutex)
其中信号(signal)和信号量(semaphore)本质上并不算是进程间通信方式,应该是进程间同步的方式,但是也可以起到一定的通信作用,故也列在上面。
另外普通的mutex是作用线程间同步用的,但是可以将进程A和进程B共享的内存中初始化一个mutex,这样就可以用将此mutex用作进程间通信用了。
# 扩展
## 进程与内核通信
其实本来的计划是分两个大块,一块写进程间通信,一块写内核与用户空间通信。后来时间有限,内核与进程间只写了一个netlink,所以没有放到这里,等以后有时间了再补充吧。
## 线程间同步
同一个进程的多个线程在同一个地址空间,通信是很容易的事情,因此多线程间要同步就好了。写了一个linux多线程的同步方式的汇总,在以下仓库中[clpsz/linux-itss](https://github.com/clpsz/linux-itss),供参考,欢迎讨论。
近期下载者:
相关文件:
收藏者: