diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-03 22:32:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-03 22:32:32 +0200 |
| commit | 1ce1210be893e7333dfa09266f6990af87c98dc2 (patch) | |
| tree | 3bfdc735ef39353c6c715399c2d9890ff423d4c4 /opendc-compute | |
| parent | 17ffe995ee06d5755cd3943a5ea14f982884009e (diff) | |
| parent | 80335a49513f3e74228aa1bfb998dd54855f68e2 (diff) | |
simulator: Add support for central resource scheduling (#126)
This pull request adds support for central resource scheduling.
This enables possible optimizations in the future where we can efficiently
schedule resource updates.
* Introduce `SimResourceScheduler` which centralizes the logic for
scheduling resource interrupts.
* Fix benchmarks
* Add generic approach for reporting resource events
* Simplify scheduling logic of resource aggregator.
**Breaking API Changes**
* Classes in `opendc-simulator-resources` now take `SimResourceScheduler` as
opposed to a `CoroutineContext` and `Clock`.
Diffstat (limited to 'opendc-compute')
| -rw-r--r-- | opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt index 6d87e444..68667a8c 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt @@ -105,6 +105,7 @@ public class SimHost( * The hypervisor to run multiple workloads. */ public val hypervisor: SimHypervisor = hypervisor.create( + scope.coroutineContext, clock, object : SimHypervisor.Listener { override fun onSliceFinish( hypervisor: SimHypervisor, |
