-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add ability to influence the OS scheduler #2261
Comments
I think that what we discuss here is mainly relevant to timing enclaves and federations. We therefor need to think about the need to control these parameters both at the global level (as proposed here), but also with the option to override it at the individual federate level. Both at the global top-level and at the federate/enclave level I think we should expose the following three parameters:
Currently, (2) and (3) are just ideas that we are discussing, so we would initially only support (1). As, mentioned, I think we need to allow setting these parameters both at the global-level and at the enclave/fed level. But that introduces some weird questions e.g.
Possible strange configuration could be detected by the compiler and a warning could be issued. |
I think the first two suggestions you had mainly cover the properties implemented in the retreat, with potentially a minor difference where the core property was referring to the number of cores, not a specific core number. The idea was you might want to use more than one core, so we can enable that. Let's say your system has 4 cores, you set these cores property to 2, the workers target property to 4, and there are 2 enclaves in the system. This would generate the following behavior in the current implementation:
I think in the future it might be useful to add another target property that can be used to map any thread to any core, but the initial goal was to define the number of cores and give the user an inherent way of defining this behavior. We decided some initial steps to implement the EDF scheduling with priority assignments under the retreat branch with @edwardalee @fra-p. Currently this is a WIP but the idea is to used inferred deadlines to assign priorities to the underlying real-time scheduler. The original details are documented under #2265. I also had couple of questions for you regarding the
For the weird questions, I think it might be easier to take one step at a time -- fedarations might make these discussions way too complicated, specifically due to the rightful questions you have raised. We might want to consider this first just with enclaves (and the default LF programs) before thinking about how can this be extended to fedarated execution. |
|
It is important to appreciate that what I here call |
While our runtime executors run reactions to completion, there is an opportunity (in the presence of an operating system) to leverage the underlying thread scheduler to achieve preemption, assuming that we have multiple workers running per core. As a starting point, to create some experiments, we need to be able to specify things like the scheduling policy, the number of cores, and potentially other things. This will allow us to make use of the functionality implemented in lf-lang/reactor-c#355.
Concrete proposal:
The text was updated successfully, but these errors were encountered: