Questions tagged [work-stealing]
A task scheduling algorithm, well suited for shared memory environments, where parallel processors can easily access each other's pending tasks.
work-stealing
36
questions
36
votes
10
answers
20k
views
Implementation of a work stealing queue in C/C++? [closed]
I'm looking for a proper implementation of a work stealing queue in C/CPP. I've looked around Google but haven't found anything useful.
Perhaps someone is familiar with a good open-source ...
29
votes
1
answer
4k
views
Java ForkJoinPool with non-recursive tasks, does work-stealing work?
I want to submit Runnable tasks into ForkJoinPool via a method:
forkJoinPool.submit(Runnable task)
Note, I use JDK 7.
Under the hood, they are transformed into ForkJoinTask objects.
I know that ...
11
votes
1
answer
3k
views
When to use the disruptor pattern and when local storage with work stealing?
Is the following correct?
The disruptor pattern has better parallel performance and scalability if each entry has to be processed in multiple ways (io operations or annotations), since that can be ...
10
votes
2
answers
5k
views
Is Work Stealing always the most appropriate user-level thread scheduling algorithm?
I've been investigating different scheduling algorithms for a thread pool I am implementing. Due to the nature of the problem I am solving I can assume that the tasks being run in parallel are ...
8
votes
3
answers
8k
views
Work/Task Stealing ThreadPoolExecutor
In my project I am building a Java execution framework that receives work requests from a client. The work (varying size) is broken down in to a set of tasks and then queued up for processing. There ...
6
votes
2
answers
10k
views
Use CompletableFuture on ForkJoinpool and avoid thread waiting
Hello I thought with CompletableFuture and the default ForkJoinPool I could optimize execution of task more than a classic ExecutorService but I missing something
With this code the execution takes 1 ...
5
votes
2
answers
7k
views
In Java 8, does Executors.newWorkStealingPool() also provide a task queue?
Is there a queue of pending tasks used in conjunction with Java 8's Executors.newWorkStealingPool()?
For example, suppose the # available cores is 2, and Executors.newWorkStealingPool() is empty ...
4
votes
3
answers
2k
views
Work stealing and deques
Why do we need a deque for work-stealing? (e.g. in Cilk) The owner works on the top and the thief steals from the bottom. Why is it useful?
We might have multiple thieves stealing from the bottom. So,...
4
votes
1
answer
466
views
Atomic storage in Chase-lev deque
I am implementing the Chase-lev deque based on the paper: "Correct and Efficient Work-Stealing for Weak Memory Models". In the paper, it requires the deque to have a buffer with atomic elements:
...
3
votes
1
answer
636
views
Work-stealing parallel job doesn't seem to steal much work
The idea is to run a parallel job on a 96-cores machine, with a work stealing ForkJoinPool.
Below is the code I'm using so far:
import scala.collection.parallel.ForkJoinTaskSupport
import scala....
3
votes
0
answers
417
views
Understanding the work stealing algorithm
I have read a lot on this algorithem. When explaining this algorithem , the words :
work stealing algorithm [closed]
Those forked subtasks can recursively
create more subtasks themself and thus ...
2
votes
1
answer
2k
views
How can I show that in Java Fork/Join framework work-stealing occurs?
I would like to improve my fork/join little example to show that during Java Fork/Join framework execution work stealing occurs.
What changes I need to do to following code? Purpose of example: just ...
2
votes
1
answer
574
views
Work Stealing: join a recursive task requires stealing?
I'm trying to understand the effect of work stealing on recursive tasks:
One of the advantages of work stealing is that the current worker/thread is likely to execute its own spawned tasks; ...
1
vote
4
answers
13k
views
work stealing algorithm [closed]
I am reading an article about Concurrency Runtime, and there is algorithm named work stealing in this article. but I have no idea what this algorithm is! so I want a little explanation or some good ...
1
vote
1
answer
61
views
Main thread context returning in a different hardware thread, undefined behaviour?
I'm currently working on a concurrency library for C++ with green threads using work stealing for load balancing between schedulers on multiple hardware threads.
I've pinned the main context to its ...
1
vote
1
answer
289
views
Cilk work stealing performance
I am reading the papers that describe Cilk's work stealing scheduling performance.
1) My understanding is that the scheduler does not know the tasks of the critical path but just tries to maintain ...
1
vote
1
answer
186
views
CUDA scheduling issue or a bug in kernel launch?
In my program I have a work deque for each block issued in the kernel lauch. Each block stays in a loop popping work in its deque, processing it and pushing dynamically generated work back. An array ...
1
vote
1
answer
348
views
Whats the benefit to use wrokstealing from ForkJoin rather than just ordinary thread pool's queue?
Whats the benefit to use workstealing from ForkJoin rather than just ordinary thread pool's queue?
is the "workstealing" from ForkJoinPool better then just take tasks from the thread pool's ...
1
vote
0
answers
130
views
Boost.Fibers hosted by worker threads seem not to work – why?
I'd like to use Boost.Fibers hosted by worker threads instead of just threads. I think I've done everything as in the manual while writing the code shown below, but it seems not to work – "<...
1
vote
0
answers
386
views
Implementation of Dijkstra’s mutual exclusion algorithm
I am trying to implement a Dijkstra's algorithm into a fork/join threadpool (consists the main threadpool with a global task queue and N threads with its own task queue) based on Dijkstra's Solution ...
1
vote
0
answers
238
views
How to implement a (low priority) scheduled workstealing ExecutorService?
My project requires two low priority tasks to be done regularly. Simple solution is to have a scheduled executor with the two tasks scheduled at fixed rate.
Now the problem is: there might be other ...
1
vote
1
answer
120
views
Parallelizing a large dynamic program
I have a high-performance dynamic program in C++ whose results are placed in an M × N table, which is roughly on the order of 2000 rows × 30000 columns.
Each entry (r, c) depends on a few of the rows ...
1
vote
1
answer
183
views
Using cilk++ work stealing
I am new to cilk++ and I want to use cilk's work stealing scheduler. I couldn't find much information on this. Can anybody help me regarding this? Thanks.
0
votes
1
answer
205
views
Java 8: ArrayDeque<>.poll returning null in parallel environment
I am trying to maintain a list of items among multiple threads, one for each thread (lets say one socket connection for each thread for example). I am maintaining this list in an ArrayDeque<>. ...
0
votes
2
answers
3k
views
How can I enforce CUDA global memory coherence without declaring pointer as volatile?
I'll first do some contextualization. I'm trying to implement a non-blocking work stealing method using deques in CUDA. The deques (aDeques) are in a block-segmented array in global memory and the ...
0
votes
1
answer
59
views
Thread-safety problem of a thread pool implementation in listing 9.8 of C++ Concurrency in Action
I'm reading C++ Concurrency in Action, 2ed. And the writer showed an implementation of thread pool that uses work stealing as follows:
// Listing 9.7 Lock-based queue for work stealing
class ...
0
votes
1
answer
551
views
Work stealing and Kernel-level thread
Work stealing is a common strategy for User-level Thread. Each process has a work queue for taking work, and will steal from others' queue when they are out of work to do.
Is there any kernel that ...
0
votes
1
answer
503
views
Is it possible to write a recursive fork join solution using Executors.newWorkStealingPool()?
The code below intends to show a simple use of a recursive fork join (find max), I know Java JIT can achieve this faster in a simple single threaded loop, however its just for demonstration.
I ...
0
votes
2
answers
884
views
Decentralized Task Scheduling Techniques in .NET
I have been trying to learn more details on CLR 4.0. and the ThreadPool and the different strategies that Microsoft recommended. I consider myself fairly up-to-date on a lot of these topics, and use ...
0
votes
0
answers
8
views
VPS server %steal reason
We have VPS hosting for our e-commerce website which use hostinger service. The server specification is 32 GB RAM with 8cpu. Now when there is only user coming up in the website also not getting ...
0
votes
0
answers
58
views
project.exe ended prematurely and may have crashed. exit code 0xc0000005
I have the TSP (Traveling Salesman Problem) which I am trying to solve in parallel using MPI (Message Passing Interface). I am attempting to apply the Work-Stealing algorithm to it.
This is the Part ...
0
votes
1
answer
928
views
How to decide whether to use newWorkStealingPool or newFixedThreadPool?
I understand that in Work Stealing Pool each thread has its own queue where as Fixed Thread Pool has a single shared unbounded queue.
But I'm still not clear in deciding which one is better among them ...
0
votes
0
answers
177
views
CompletableFulture runAsync not starting new thread
CompletableFuture.runAsync(() -> {
//somecode
System.out.println ("Do something")
}, Executors.newWorkStealingPool() );
I want to do something in async. But my code is never executed. It is not ...
0
votes
1
answer
80
views
WPF Dispatcher and Work Stealing?
I have an application which uses WPF for its GUI but, on command kicks off a very heavy processing load.
I noticed that my GUI was rather sluggish when the engine (heavy processing) was running and ...
0
votes
3
answers
512
views
Issues multi-threading the loading of thousands of images causing IOException
I am having an issue loading a large amount of images via the ForkJoinPool, I am testing on a 4 core Intel with hyper-theading so 8 logical threads. However, I limit the Pool to only 4 Threads. And I ...
-1
votes
1
answer
269
views
BOOST_ASSERT failure raised in boost::fiber on Visual Studio "Debug" build
I run into issue with boost::fiber. My code is based on "work_stealing.cpp" example of boost::fiber. I decorated it a little bit. It can work now on Windows Subsystem Linux Ubuntu for both ...