Open
Conversation
Member
Author
|
@dandeduck this is the thing you wanted |
Member
Yeah, the moment I saw the mail about it I got excited. But I also wonder how well could that even work because of the limited resources, not to mention concurrency issues. |
Member
Author
|
Ran a test with RoboRIO. The implementation proved problematic, with a significant delay in execution and perhaps even a lack of running. Due to a lack of time, it is unclear. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An implementation of
Schedulerwhich uses workers executing in a separate thread to run actions.Still requires more testing.
When considering the roboRIO as a platform (which contains an dual-core ARM Cortext-A9), this may not provide much since it only has 2 cores and it is quite likely that there are enough threads (and other processes) executing on the system.
A lot of the implementation depends on cache coherency being maintained across multiple cores. This can be traced to 2 reasons:
ActionContextorActionState)According to developer.arm.com
Concept
The idea is pretty straight forward. The scheduler manages several workers, each running in a separate thread, which is a simple daemon.
At any given moment, a worker handles one action, grabbing it from a shared work queue. That action is handled by executing a single cycle (
ActionContext.run). If the action is finished, it is inserted into a shared finished queue. Otherwise, it is inserted into the shared work queue to be handled again.In order to properly synchronize requirements usage, actually starting and finishing actions is done in the main thread of the robot (which is used to run
Scheduler.run).Scheduler.runis used to