Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-optimizing task distribution on threads #22

Open
dominicparga opened this issue Nov 8, 2016 · 2 comments
Open

Self-optimizing task distribution on threads #22

dominicparga opened this issue Nov 8, 2016 · 2 comments

Comments

@dominicparga
Copy link
Collaborator

dominicparga commented Nov 8, 2016

Every step, tasks of a certain number of vehicles are executed per thread. This number is fix and can be changed by the user. This distribution depends on the number of threads and maybe, it can be optimized automatically. It is also needed in the distribution of nodes. The classes are in the core/simulation package.

@dominicparga dominicparga added this to the Multithreading milestone Nov 8, 2016
@dominicparga
Copy link
Collaborator Author

I've added an interface and a simple implementation of a task-independant approach to distribute tasks to threads. This is still NOT automatically distributed. It uses the same functionality as before (fix number of elements executed per thread in one go), but it is more general than before, because this code is independent of this simulation.

@dominicparga
Copy link
Collaborator Author

dominicparga commented Dec 27, 2016

Important information: clearing an iterator dynamically (means each thread gets the instance of the iterator and calls next, synchronized) does not guarantee that every element is returned exactly once. Therefore, a static implementation is used (every thread/task gets its own list of elements, which are created and filled by one thread).

@dominicparga dominicparga removed this from the Multithreading milestone Feb 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants