执行障碍在共享内存进程间 [英] Barrier implementation for inter process in shared memory
问题描述
我要寻找一个流程间的屏障实现。进程是在共享内存中(即在同一ndoe)。
I am looking for an inter-processes barrier implementation. Processes are in shared memory (ie. on the same ndoe).
进程是MPI的。我不想用MPI_Barrier功能,因为对于所有的MPI实现的一般政策是积极的等待。我希望我睡觉的过程,只要等待。
Processes are MPI ones. I do not want to use the MPI_Barrier function, because the general policy for all the MPI implementation is active waiting. I want my processes sleeping as long as they wait.
的限制:
- 应该在C,也许在C ++
- 无自旋锁,所以它可以使用旗语
- Linux操作系统
我相信它的存在数以千计的屏障实现,但我没有找到任何?!
I am confident it exists thousands of barrier implementation, but I do not find any?!
感谢
推荐答案
pthread_barrier
是障碍POSIX API。他们可能住在你初始化他们进行相应的处理共享内存。
pthread_barrier
is the POSIX API for barriers. They may live in process shared memory if you initialize them accordingly.
这篇关于执行障碍在共享内存进程间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!