[477] | 1 | package schedframe.scheduling.plugin.estimation; |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | import java.util.Map; |
---|
| 5 | |
---|
[490] | 6 | import dcworms.schedframe.scheduling.ExecTask; |
---|
| 7 | |
---|
[477] | 8 | import schedframe.Plugin; |
---|
| 9 | import schedframe.events.scheduling.SchedulingEvent; |
---|
| 10 | import schedframe.resources.units.ResourceUnit; |
---|
| 11 | import schedframe.resources.units.ResourceUnitName; |
---|
| 12 | |
---|
| 13 | /** |
---|
| 14 | * This interface is responsible for estimation of task execution time. It |
---|
| 15 | * provides all necessary information to compute execution time. In general, the |
---|
| 16 | * major method allow to develop different approaches and strategies of |
---|
| 17 | * execution time computation. Ratings of processors, available memory, length |
---|
| 18 | * of task (number of CPU instructions) and task requirements are used to |
---|
| 19 | * specify duration of the task. The interface method returns an estimated |
---|
| 20 | * execution time of the task, which is then applied to simulation. |
---|
| 21 | * |
---|
| 22 | * @author Marcin Krystek |
---|
| 23 | * |
---|
| 24 | */ |
---|
| 25 | public interface ExecutionTimeEstimationPlugin extends Plugin { |
---|
| 26 | |
---|
| 27 | /** |
---|
| 28 | * |
---|
| 29 | * @param allocatedResources resource units allocated for task execution |
---|
| 30 | * @param task which will be executed |
---|
[1382] | 31 | * @param completionPercentage |
---|
[477] | 32 | * @return estimated execution time of a task of specified length |
---|
| 33 | */ |
---|
| 34 | public double execTimeEstimation(SchedulingEvent event, ExecTask task, Map<ResourceUnitName, ResourceUnit> allocatedResources, |
---|
| 35 | double completionPercentage); |
---|
| 36 | |
---|
[1382] | 37 | |
---|
| 38 | /** |
---|
| 39 | * |
---|
| 40 | * @param srcResources resource units to migrate from |
---|
| 41 | * @param dstResources resource units to migrate to |
---|
| 42 | * @param task which will be executed |
---|
| 43 | * @return estimated execution time of a task of specified length |
---|
| 44 | */ |
---|
| 45 | public double estimateMigrationTime(SchedulingEvent event, ExecTask task, Map<ResourceUnitName, ResourceUnit> srcResources, Map<ResourceUnitName, ResourceUnit> dstResources); |
---|
[477] | 46 | } |
---|