-
Notifications
You must be signed in to change notification settings - Fork 24
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
Quasi static scheduler runtime #90
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks promising. A few questions included. Also, there is not enough documentation to know how to use it. Ideally, it would explain how to create (manually) a quasi-static schedule somewhere so that one could use these extensions.
// lf_mutex_lock(&_lf_sched_instance->_lf_sched_semaphore->mutex); | ||
// lf_cond_wait(&_lf_sched_instance->_lf_sched_semaphore->cond, &_lf_sched_instance->_lf_sched_semaphore->mutex); | ||
// lf_mutex_unlock(&_lf_sched_instance->_lf_sched_semaphore->mutex); | ||
lf_cond_wait(&_lf_sched_instance->_lf_sched_array_of_conds[0], &mutex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this index be the worker number rather than 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although the field is called _lf_sched_array_of_conds
, the current implementation only uses one condition variable to coordinate time advancement. An array is used here so that a future scheduler implementation that needs multiple condition variables can still use this field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment in the code about this would be helpful.
0bfa648
to
c811341
Compare
What is the relationship between this PR and #241? |
This is a draft PR for the C runtime of the quasi-static (QS) scheduler. The design of the scheduler follows the one in this report and (mostly) in this discussion thread.
This scheduler runtime concurrently must be compiled against a
schedule.h
file, which should be generated by a static schedule generator inlfc
. A preliminary version of the schedule generator is implemented using Uclid5 on this branch.Here are the outstanding TODOs in order to make this scheduler able to be merged in:
An important TODO after a more efficient schedule generator is merged into
lingua-franca
:More research-related items:
branch
instruction in the instruction set.Use cases: