Scheduling by CPU and RAM
This should be implemented in the scheduler. Workers can be dynamically spawned depending on available RAM and CPU usage. This requires an estimate of RAM and CPU usage of the tasks. This is probably best implemented in the task_wrapper
. The task_wrapper
is wrapped around the functions from the library and then executed by the workers that are spawned by the scheduler. Perhaps the scheduler itself is also a good place for implementing the monitoring.