且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

工作窃取队列中的C / C实现++?

更新时间:2022-03-15 22:01:20

没有免费的午餐。

请看看原来的工作窃取纸。本文是很难理解的。我知道,纸中含有的理论依据,而不是伪code。然而,根本就没有这样的更多的简单版本比TBB。如果有的话,它不会给***性能。工作窃取本身会带来开销一定量,从而优化和技巧是非常重要的。特别是,出队都必须是线程安全的。实现高​​度可扩展和低开销的同步是具有挑战性的。

Please take a look the original work stealing paper. This paper is hard to understand. I know that paper contains theoretical proof rather than pseudo code. However, there is simply no such much more simple version than TBB. If any, it won't give optimal performance. Work stealing itself incurs some amount of overhead, so optimizations and tricks are quite important. Especially, dequeues are must be thread-safe. Implementing highly scalable and low-overhead synchronizations are challenging.

我真的不知道为什么你需要它。我认为的正确实施的意思是这样TBB和的Cilk。此外,工作窃取是很难实现的。

I'm really wondering why you need it. I think that proper implementation means something like TBB and Cilk. Again, work stealing is hard to implement.