Class ToThresholdBalancer
java.lang.Object
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.loaddistribution.balancers.AbstractLoadBalancer
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.loaddistribution.balancers.ToThresholdBalancer
- All Implemented Interfaces:
ILoadBalancer
Ensures that the load of two resource instances does not differ more than
'threshold'. The threshold is a relative value between 0 and 1. If 0 the load
of both instances must be equal, if 1 the load of both instances is never
balanced.
-
Field Summary
Fields inherited from class edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.loaddistribution.balancers.AbstractLoadBalancer
balancing_interval, prio_increasing, queue_ascending, queue_holder -
Constructor Summary
ConstructorsConstructorDescriptionToThresholdBalancer(de.uka.ipd.sdq.scheduler.SchedulerModel model, double balancing_interval, boolean prio_increasing, boolean queue_ascending, int threshold) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivelyBalance(IResourceInstance instance) Balances the load.voidonFork(IResourceInstance instance) voidonSleep(IResourceInstance instance) voidonTerminate(IResourceInstance instance) voidonWake(IResourceInstance instance) Methods inherited from class edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.loaddistribution.balancers.AbstractLoadBalancer
load, setQueueHolder
-
Constructor Details
-
ToThresholdBalancer
public ToThresholdBalancer(de.uka.ipd.sdq.scheduler.SchedulerModel model, double balancing_interval, boolean prio_increasing, boolean queue_ascending, int threshold)
-
-
Method Details
-
activelyBalance
Description copied from interface:ILoadBalancerBalances the load. Two scenarios are possible. Either the load is balanced between all instances, or the specified instances pulls processes from the busiest one. -
onFork
-
onSleep
-
onTerminate
-
onWake
-