hdeeprm.manager module¶
Defines HDeepRM managers, which are in charge of mapping Jobs to resources.
-
class
hdeeprm.manager.JobScheduler[source]¶ Bases:
objectSelects Jobs from the Job Queue to be processed in the Platform.
The Job selection policy is defined by the sorting key. Only one job is peeked in order to check for sufficient resources available for it.
-
peeked_job¶ Cached next Job to be processed. This saves sorting the Job Queue a second time.
Type: batsim.batsim.Job
-
sorting_key¶ Key defining the Job selection policy.
Type: function
-
new_job(job: batsim.batsim.Job) → None[source]¶ Inserts a new job in the queue.
By default, it is appended to the right end of the queue.
Parameters: job (batsim.batsim.Job) – Incoming Job to be inserted into the Job Queue.
-
-
class
hdeeprm.manager.ResourceManager[source]¶ Bases:
objectSelects Cores and maintains Core states for serving incoming Jobs.
The Core selection policy is defined by the sorting key. The Core Pool is filtered by this key to obtain the required resources by the Job. Cores have a state, which describes their availability as well as computational capability and power consumption. Core selection might fail if there are not enough available resources for the selected Job.
-
over_utilization¶ Tracks over-utilizations of cores, memory capacity and memory bandwidth.
Type: dict
-
sorting_key¶ Key defining the Core selection policy.
Type: function
-
get_resources(job: batsim.batsim.Job, now: float) → procset.ProcSet[source]¶ Gets a set of resources for the selected job.
State of resources change as they are being selected.
Parameters: - job (batsim.batsim.Job) – Job to be served by the selected Cores. Used for checking requirements.
- now (float) – Current simulation time in seconds.
Returns: Set of Cores as a
ProcSet. None if not enough resources available.
-
update_state(job: batsim.batsim.Job, id_list: list, new_state: str, now: float) → tuple[source]¶ Modifies the state of the computing resources.
This affects speed, power and availability for selection. Modifications are local to the Decision System until communicated to the Simulator. Modifying the state of a Core might trigger alterations on Cores in the same Processor or Node scope due to shared resources.
Parameters: - job (batsim.batsim.Job) – Job served by the selected Cores. Used for updating resource contention.
- id_list (list) – IDs of the Cores to be updated directly.
- new_state (str) – Either “LOCKED” (makes Cores unavailable) or “FREE” (makes Cores available).
- now (float) – Current simulation time in seconds.
Returns: A dictionary with all directly and indirectly modified Cores. Keys are the Cores IDs, values are the new P-states.
-