When a task forks a new thread, it pushes it onto the head of its own deque.
当一个任务划分一个新线程时,它将自己推到deque的头部。
In the event the thread's task queue is empty, it then tries to steal another task off the tail of another thread's deque.
当线程的任务队列为空,它将尝试从另一个线程的deque的尾部窃取另一个任务。
My classes were all about finding the best algorithm or discovering new data structures that behave like old ones (anyone remember implementing a deque?).
我上的课只是教会了我们怎样寻找最好的算法,或是和旧的数据结构行为相似的新数据结构(还有人记得双向队列么?)
Work stealing can be implemented with standard queues, but using a deque has two principle advantages over a standard queue: reduced contention and reduced stealing.
可以使用标准队列实现工作窃取,但是与标准队列相比,deque具有两方面的优势:减少争用和窃取。
Work stealing can be implemented with standard queues, but using a deque has two principle advantages over a standard queue: reduced contention and reduced stealing.
可以使用标准队列实现工作窃取,但是与标准队列相比,deque具有两方面的优势:减少争用和窃取。
应用推荐