wrench::GreedyServerlessScheduler
-
class GreedyServerlessScheduler : public wrench::ServerlessScheduler
A class that implements a greedy scheduler for a serverless compute service. It can be instantiated with various policies for ordering schedulable invocations, deciding on evictions (idle containers, in-RAM layers, on-disk layers), and comparing various action/evication plans on different compute nodes. Some policies are provided, but custom one can be developed.
Note that this scheduling algorithm, while reasonable, is not necessarily in line with the scheduling in real-world serverless platforms.
Public Functions
Constructor.
- Parameters:
invocation_ordering – the invocation sorting policy
eviction – the eviction policy
plan_selection – the plan selection policy
-
ServerlessEvictionPolicy *getEvictionPolicy() const
Get the scheduler’s eviction policy.
- Returns:
the policy
-
ServerlessInvocationOrderingPolicy *getInvocationOrderingPolicy() const
Get the scheduler’s invocation ordering policy.
- Returns:
the policy
-
ServerlessPlanSelectionPolicy *getPlanSelectionPolicy() const
Get the scheduler’s plan selection policy.
- Returns:
the policy
Given the list of schedulable invocations and the current system state, decide on which compute node each invocation should go and then encode what needs to be done to make it happen.
- Parameters:
schedulable_invocations – A list of schedulable (i.e., with image on the head node’s disk) invocations
state – the current system state
- Returns:
A SchedulingDecisions object