wrench::ServerlessSchedulingState
-
class ServerlessSchedulingState
A class to encode a “scheduling state”, that is a clone of the system state that a scheduler can work with and modify at will for planning purposes.
Public Functions
Constructor.
- Parameters:
state – current system state
schedulable_invocations – the schedulable invocations
Are all layers of an image in RAM at a compute node?
- Parameters:
image – an image
node – the compute node
- Returns:
True if all necessary layers are in RAM
Are all layers either in ram or on their way to ram at a compute node?
- Parameters:
image – an image
node – the compute node
- Returns:
True or false
Are all layers either on disk or on their way to ram at a compute node?
- Parameters:
image – an image
node – the compute node
- Returns:
True or false
Are all layers either on disk or on their way to ram at a compute node?
- Parameters:
image – an image
node – the compute node
- Returns:
True or false
Are all layers either on disk or on their way to ram at a compute node?
- Parameters:
image – an image
node – the compute node
- Returns:
True or false
Public Members
-
std::map<std::shared_ptr<ServerlessComputeNode>, std::set<std::shared_ptr<Container>>> _busy_containers
Map of running containers.
-
std::vector<std::shared_ptr<ServerlessComputeNode>> _compute_nodes
The compute nodes.
-
std::map<std::shared_ptr<ServerlessComputeNode>, unsigned int> _cores_available
Map of core availability.
-
std::map<std::shared_ptr<ServerlessComputeNode>, sg_size_t> _disk_available
Map of disk availability.
-
std::map<std::shared_ptr<ServerlessComputeNode>, std::set<std::shared_ptr<Container>>> _idle_containers
Map of idle containers.
-
std::map<std::shared_ptr<ServerlessComputeNode>, std::set<std::shared_ptr<ImageLayer>>> _image_layers_in_ram
Map of in-RAM image layers.
-
std::map<std::shared_ptr<ServerlessComputeNode>, std::set<std::shared_ptr<ImageLayer>>> _image_layers_on_disk
Map of on-disk image layers.
-
std::map<std::shared_ptr<ServerlessComputeNode>, std::set<std::shared_ptr<ImageLayer>>> _image_layers_on_their_way_to_disk
Map of soon-to-be-on-disk image layers.
-
std::map<std::shared_ptr<ServerlessComputeNode>, std::set<std::shared_ptr<ImageLayer>>> _image_layers_on_their_way_to_ram
Map of soon-to-be-in-RAM image layers.
-
std::map<std::shared_ptr<ServerlessComputeNode>, std::set<std::shared_ptr<ImageLayer>>> _protected_layers
Map of layers that should not be evicted, due to previous scheduling decisions.
-
std::map<std::shared_ptr<ServerlessComputeNode>, sg_size_t> _ram_available
Map of RAM availability.