Commit 75bfd331 by Michael Schmid

Minor changes and comments

parent db00ddd1
......@@ -5,6 +5,7 @@ import java.util.List;
import mvd.jester.model.DagTask;
import mvd.jester.model.SystemManager;
import mvd.jester.model.SystemManager.DagTaskBuilder;
import mvd.jester.model.SystemManager.DeadlineType;
import mvd.jester.tests.AbstractTest;
import mvd.jester.tests.JiangYi;
import mvd.jester.tests.SchmidMottok;
......@@ -26,7 +27,6 @@ public class App {
List<AbstractTest<DagTask>> tests = te.registerTests(Arrays.asList(
new SchmidMottok(new UnknownStructure(), manager), //
// new Tester(new UnknownStructure(),manager),
// new MelaniButtazzo(manager),,
// new FonsecaNelis(manager), //
// new DongLiu(manager), //
......@@ -34,77 +34,38 @@ public class App {
new JiangYi(manager)//
));
te.varyRenyiUtilization(manager, tests, 200);
te.varyRenyiUtilization(manager, tests, 200, DeadlineType.IMPLICIT);
}
{
SystemManager<DagTaskBuilder> manager =
new SystemManager<>(DagTaskBuilder.class);
manager.setNumberOfProcessors(16);
manager.setNumberOfProcessors(8);
TestEnvironment te = new TestEnvironment();
List<AbstractTest<DagTask>> tests = te.registerTests(Arrays.asList(
List<AbstractTest<DagTask>> tests = te.registerTests(Arrays.asList( //
new SchmidMottok(new UnknownStructure(), manager), //
// new Tester(new UnknownStructure(),manager),
// new MelaniButtazzo(manager),,
// new Tester(new UnknownStructure(), manager), //
// new MelaniButtazzo(manager), //
// new FonsecaNelis(manager), //
// new DongLiu(manager), //
new UeterAgrawal(manager), //
new JiangYi(manager)//
));
new JiangYi(manager)));
te.varyRenyiUtilization(manager, tests, 200);
te.varyNumberOfProcessors(manager, tests, 200);
}
{
SystemManager<DagTaskBuilder> manager =
new SystemManager<>(DagTaskBuilder.class);
manager.setNumberOfProcessors(32);
manager.setNumberOfProcessors(8);
TestEnvironment te = new TestEnvironment();
List<AbstractTest<DagTask>> tests = te.registerTests(Arrays.asList(
List<AbstractTest<DagTask>> tests = te.registerTests(Arrays.asList( //
new SchmidMottok(new UnknownStructure(), manager), //
// new Tester(new UnknownStructure(),manager),
// new MelaniButtazzo(manager),,
// new MelaniButtazzo(manager), //
// new FonsecaNelis(manager), //
// new DongLiu(manager), //
new UeterAgrawal(manager), //
new JiangYi(manager)//
));
new JiangYi(manager)));
te.varyRenyiUtilization(manager, tests, 200);
te.varyNumberOfTasks(manager, tests, 200);
}
// {
// SystemManager<DagTaskBuilder> manager = new
// SystemManager<>(DagTaskBuilder.class);
// manager.setNumberOfProcessors(8);
// TestEnvironment te = new TestEnvironment();
// List<AbstractTest<DagTask>> tests = te.registerTests(Arrays.asList( //
// // new SchmidMottok(new KnownStructure(), manager), //
// new SchmidMottok(new UnknownStructure(), manager), //
// // new Tester(new UnknownStructure(), manager), //
// // new MelaniButtazzo(manager), //
// new FonsecaNelis(manager), //
// new UeterAgrawal(manager), //
// new JiangYi(manager)));
// te.varyNumberOfProcessors(manager, tests, 200);
// }
// {
// SystemManager<DagTaskBuilder> manager = new
// SystemManager<>(DagTaskBuilder.class);
// manager.setNumberOfProcessors(8);
// TestEnvironment te = new TestEnvironment();
// List<AbstractTest<DagTask>> tests = te.registerTests(Arrays.asList( //
// // new SchmidMottok(new KnownStructure(), manager), //
// new SchmidMottok(new UnknownStructure(), manager), //
// // new Tester(new UnknownStructure(), manager), //
// // new MelaniButtazzo(manager), //
// new FonsecaNelis(manager), //
// new UeterAgrawal(manager), //
// new JiangYi(manager)));
// te.varyNumberOfTasks(manager, tests, 200);
// }
}
}
......@@ -16,12 +16,14 @@ import mvd.jester.model.SynchronousTask;
import mvd.jester.model.SystemManager;
import mvd.jester.model.Task;
import mvd.jester.model.SystemManager.DagTaskBuilder;
import mvd.jester.model.SystemManager.DeadlineType;
import mvd.jester.model.SystemManager.SynchronousTaskBuilder;
import mvd.jester.priority.PriorityManager;
import mvd.jester.tests.AbstractTest;
/**
* TestEnvironment
* This class is responsible for running the evaluations on multiple task sets
*/
public class TestEnvironment {
......@@ -33,7 +35,13 @@ public class TestEnvironment {
return new ArrayList<>(tests);
}
/***
* OUTDATED: For Parallel Synchronous Task model
* @param builder
* @param abstractTestInstances
* @param numberOfProcessors
* @param numberOfTaskSets
*/
public void runExperiments(final SynchronousTaskBuilder builder,
final Set<ResultCollector<AbstractTest<SynchronousTask>>> abstractTestInstances,
final long numberOfProcessors, final long numberOfTaskSets) {
......@@ -78,6 +86,12 @@ public class TestEnvironment {
// resultLogger.logTests(abstractTestInstances);
}
/***
* Measure the performance of each test
* @param manager SystemManager that is used to generate random task sets
* @param abstractTestInstances List of feasibility tests
* @param numberOfMeasurements Number of measurements performed for each test
*/
public void measureExecutionTimes(final SystemManager<DagTaskBuilder> manager,
final List<AbstractTest<DagTask>> abstractTestInstances,
final long numberOfMeasurements) {
......@@ -108,6 +122,12 @@ public class TestEnvironment {
}
/***
* Computes the feasibility varying the number of processors in the systen
* @param manager SystemManager that is used to generate task sets
* @param abstractTestInstances List of feasibility tests
* @param numberOfTaskSetsPerStep Number of task sets that are to be generated for each step (number of processors)
*/
public void varyNumberOfProcessors(final SystemManager<DagTaskBuilder> manager,
final List<AbstractTest<DagTask>> abstractTestInstances,
final long numberOfTaskSetsPerStep) {
......@@ -124,7 +144,7 @@ public class TestEnvironment {
resultMap.replaceAll((k, v) -> (long) 0);
for (int i = 0; i < numberOfTaskSetsPerStep; ++i) {
final Set<DagTask> taskSet = manager.getBuilder().generateUUnifastTaskSet(
(long) (1.5 * numberOfProcessors), (double) numberOfProcessors * 0.75);
(long) (1.5*numberOfProcessors), (double) numberOfProcessors * 0.75);
System.out.print(checkedTasksets + "/" + numberOfTaskSets + " tasksets tested!\r");
for (final AbstractTest<DagTask> testInstance : abstractTestInstances) {
......@@ -149,7 +169,12 @@ public class TestEnvironment {
resultLogger.finalize();
}
/***
* Computes the feasibility varying the number of tasks in the task set
* @param manager SystemManager that is used to generate task sets
* @param abstractTestInstances List of feasibility tests
* @param numberOfTaskSetsPerStep Number of task sets that are to be generated for each step (number of tasks)
*/
public void varyNumberOfTasks(final SystemManager<DagTaskBuilder> manager,
final List<AbstractTest<DagTask>> abstractTestInstances,
final long numberOfTaskSetsPerStep) {
......@@ -191,6 +216,12 @@ public class TestEnvironment {
resultLogger.finalize();
}
/***
* Computes the feasibility varying the total system utilization of the task set
* @param manager SystemManager that is used to generate task sets
* @param abstractTestInstances List of feasibility tests
* @param numberOfTaskSetsPerUtil Number of task sets that are to be generated for each step (system utilization)
*/
public void varyUtilization(final SystemManager<DagTaskBuilder> manager,
final List<AbstractTest<DagTask>> abstractTestInstances,
final long numberOfTaskSetsPerUtil) {
......@@ -231,9 +262,16 @@ public class TestEnvironment {
resultLogger.finalize();
}
/***
* Computes the feasibility varying the total system utilization of the task set (Task set is generated by the Renyi method)
* @param manager SystemManager that is used to generate task sets
* @param abstractTestInstances List of feasibility tests
* @param numberOfTaskSetsPerUtil Number of task sets that are to be generated for each step (system utilization)
* @param deadlineType Deadline model (implicit or constrained)
*/
public void varyRenyiUtilization(final SystemManager<DagTaskBuilder> manager,
final List<AbstractTest<DagTask>> abstractTestInstances,
final long numberOfTaskSetsPerUtil) {
final long numberOfTaskSetsPerUtil, DeadlineType deadlineType) {
final long numberOfProcessors = manager.getNumberOfProcessors();
long checkedTasksets = 0;
final long numberOfTaskSets = ((numberOfProcessors * 4) - 3) * numberOfTaskSetsPerUtil;
......@@ -248,7 +286,7 @@ public class TestEnvironment {
(double) numberOfProcessors / 32) {
resultMap.replaceAll((k, v) -> (long) 0);
for (int i = 0; i < numberOfTaskSetsPerUtil; ++i) {
final Set<DagTask> taskSet = manager.getBuilder().generateRenyiTaskSet(util);
final Set<DagTask> taskSet = manager.getBuilder().generateRenyiTaskSet(util, deadlineType);
System.out.print(checkedTasksets + "/" + numberOfTaskSets + " tasksets tested!\r");
for (final AbstractTest<DagTask> testInstance : abstractTestInstances) {
......@@ -273,6 +311,13 @@ public class TestEnvironment {
resultLogger.finalize();
}
/***
* Computes the feasibility varying the probability in the Renyi method the task set (Task set is generated by the Renyi method)
* @param manager SystemManager that is used to generate task sets
* @param abstractTestInstances List of feasibility tests
* @param numberOfTaskSetsPerStep Number of task sets that are to be generated for each step (probability)
*/
public void varyPropability(final SystemManager<DagTaskBuilder> manager,
final List<AbstractTest<DagTask>> abstractTestInstances,
final long numberOfTaskSetsPerStep) {
......@@ -288,7 +333,7 @@ public class TestEnvironment {
manager.setPropability(p_add);
resultMap.replaceAll((k, v) -> (long) 0);
for (int i = 0; i < numberOfTaskSetsPerStep; ++i) {
final Set<DagTask> taskSet = manager.getBuilder().generateRenyiTaskSet(5.5);
final Set<DagTask> taskSet = manager.getBuilder().generateRenyiTaskSet(5.5, DeadlineType.IMPLICIT);
System.out.print(checkedTasksets + "/" + numberOfTaskSets + " tasksets tested!\r");
for (final AbstractTest<DagTask> testInstance : abstractTestInstances) {
......
......@@ -31,6 +31,10 @@ import mvd.jester.utils.BinaryDecompositionTree;
import mvd.jester.utils.BinaryDecompositionTree.Node;
import mvd.jester.utils.BinaryDecompositionTree.NodeType;
/***
* Response time analysis presented by Fonseca et al.
* " Improved Response Time Analysis of Sporadic DAG Tasks for Global FP Scheduling"
*/
public class FonsecaNelis extends AbstractTest<DagTask> {
private final Map<Task, TerminationInfo> responseTimes;
......
......@@ -17,6 +17,10 @@ import mvd.jester.model.Task;
import mvd.jester.priority.EarliestDeadlineFirst;
import mvd.jester.priority.PriorityManager;
/***
* Semi-Federated Scheduling presented by Jiang et al.
* "Semi-Federated Scheduling of Parallel Real-Time Tasks on Multiprocessor"
*/
public class JiangYi extends AbstractTest<DagTask> {
private final EarliestDeadlineFirst priorityManager;
......
......@@ -14,6 +14,10 @@ import mvd.jester.model.Task;
import mvd.jester.priority.PriorityManager;
import mvd.jester.priority.RateMonotonic;
/***
* Response time analysis presented by Melani et al.
* "Response-Time Analysis of Conditional DAG Tasks in Multiprocessor Systems"
*/
public class MelaniButtazzo extends AbstractTest<DagTask> {
private final Map<Task, TerminationInfo> responseTimes;
......
......@@ -15,7 +15,7 @@ import mvd.jester.priority.DeadlineMonotonic;
import mvd.jester.priority.PriorityManager;
/**
* SchmidMottok
* Our response time analysis
*/
public class SchmidMottok extends AbstractTest<DagTask> {
......@@ -52,6 +52,10 @@ public class SchmidMottok extends AbstractTest<DagTask> {
return "SchmidMottok" + "_" + structure.getType();
}
/***
* Computes the number of threads for each task
* @param tasks The set of tasks
*/
private void reassignNumberOfThreads(Set<DagTask> tasks) {
long numberOfProcessors = manager.getNumberOfProcessors();
long occupiedProcessors = 0;
......@@ -65,6 +69,12 @@ public class SchmidMottok extends AbstractTest<DagTask> {
}
}
/***
* Computes the response time for given task
* @param tasks Set of tasks in the system
* @param task Task for which the response time is computed
* @return Response time of task
*/
private long calculateResponseTime(final Set<DagTask> tasks, final DagTask task) {
final long minimumWcet = task.getCriticalPath();
long responseTime = minimumWcet;
......
......@@ -9,6 +9,10 @@ import mvd.jester.model.Segment;
import mvd.jester.model.SystemManagerInterface;
import mvd.jester.model.Task;
/***
* Different methods given if the structure of the DAG is known in advance.
* Only UnknownStructure is presented in the paper.
*/
public interface TypeFunction {
public double getTaskInterference(final DagTask task,
......@@ -79,6 +83,9 @@ public interface TypeFunction {
}
}
/***
* This class is presented in the paper
*/
public class UnknownStructure implements TypeFunction {
@Override
......
......@@ -18,6 +18,10 @@ import mvd.jester.model.Task;
import mvd.jester.priority.EarliestDeadlineFirst;
import mvd.jester.priority.PriorityManager;
/***
* Reservation-based federated scheduling presented by Ueter et al.
* "Reservation-Based Federated Scheduling for Parallel Real-Time Tasks"
*/
public class UeterAgrawal extends AbstractTest<DagTask> {
private final EarliestDeadlineFirst priorityManager;
......@@ -101,7 +105,6 @@ public class UeterAgrawal extends AbstractTest<DagTask> {
final long second = (long) Math
.ceil(((double) workload - criticalPath) / (criticalPath * (strechRatio - 1)));
// TODO: what are those boundaries?
final long max = Math.max(first, second);
return max;
......@@ -160,6 +163,10 @@ public class UeterAgrawal extends AbstractTest<DagTask> {
}
}
/***
* Assigns threads and the stretch ratio to each task
* @param tasks Set of tasks in the system
*/
private void assignThreadsAndStretchRatio(Set<DagTask> tasks) {
for (DagTask t : tasks) {
final long criticalPath = t.getCriticalPath();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment