Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
jester
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
75bfd331
authored
Feb 22, 2022
by
Michael Schmid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes and comments
parent
db00ddd1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
210 additions
and
76 deletions
+210
-76
src/main/java/mvd/jester/App.java
+13
-52
src/main/java/mvd/jester/TestEnvironment.java
+51
-6
src/main/java/mvd/jester/model/SystemManager.java
+108
-16
src/main/java/mvd/jester/tests/FonsecaNelis.java
+4
-0
src/main/java/mvd/jester/tests/JiangYi.java
+4
-0
src/main/java/mvd/jester/tests/MelaniButtazzo.java
+4
-0
src/main/java/mvd/jester/tests/SchmidMottok.java
+11
-1
src/main/java/mvd/jester/tests/TypeFunction.java
+7
-0
src/main/java/mvd/jester/tests/UeterAgrawal.java
+8
-1
No files found.
src/main/java/mvd/jester/App.java
View file @
75bfd331
...
@@ -5,6 +5,7 @@ import java.util.List;
...
@@ -5,6 +5,7 @@ import java.util.List;
import
mvd.jester.model.DagTask
;
import
mvd.jester.model.DagTask
;
import
mvd.jester.model.SystemManager
;
import
mvd.jester.model.SystemManager
;
import
mvd.jester.model.SystemManager.DagTaskBuilder
;
import
mvd.jester.model.SystemManager.DagTaskBuilder
;
import
mvd.jester.model.SystemManager.DeadlineType
;
import
mvd.jester.tests.AbstractTest
;
import
mvd.jester.tests.AbstractTest
;
import
mvd.jester.tests.JiangYi
;
import
mvd.jester.tests.JiangYi
;
import
mvd.jester.tests.SchmidMottok
;
import
mvd.jester.tests.SchmidMottok
;
...
@@ -26,7 +27,6 @@ public class App {
...
@@ -26,7 +27,6 @@ public class App {
List
<
AbstractTest
<
DagTask
>>
tests
=
te
.
registerTests
(
Arrays
.
asList
(
List
<
AbstractTest
<
DagTask
>>
tests
=
te
.
registerTests
(
Arrays
.
asList
(
new
SchmidMottok
(
new
UnknownStructure
(),
manager
),
//
new
SchmidMottok
(
new
UnknownStructure
(),
manager
),
//
// new Tester(new UnknownStructure(),manager),
// new MelaniButtazzo(manager),,
// new MelaniButtazzo(manager),,
// new FonsecaNelis(manager), //
// new FonsecaNelis(manager), //
// new DongLiu(manager), //
// new DongLiu(manager), //
...
@@ -34,77 +34,38 @@ public class App {
...
@@ -34,77 +34,38 @@ public class App {
new
JiangYi
(
manager
)
//
new
JiangYi
(
manager
)
//
));
));
te
.
varyRenyiUtilization
(
manager
,
tests
,
200
);
te
.
varyRenyiUtilization
(
manager
,
tests
,
200
,
DeadlineType
.
IMPLICIT
);
}
}
{
{
SystemManager
<
DagTaskBuilder
>
manager
=
SystemManager
<
DagTaskBuilder
>
manager
=
new
SystemManager
<>(
DagTaskBuilder
.
class
);
new
SystemManager
<>(
DagTaskBuilder
.
class
);
manager
.
setNumberOfProcessors
(
16
);
manager
.
setNumberOfProcessors
(
8
);
TestEnvironment
te
=
new
TestEnvironment
();
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
SchmidMottok
(
new
UnknownStructure
(),
manager
),
//
// new Tester(new UnknownStructure(),
manager),
// new Tester(new UnknownStructure(),
manager), //
// new MelaniButtazzo(manager),
,
// new MelaniButtazzo(manager),
//
// new FonsecaNelis(manager), //
// new FonsecaNelis(manager), //
// new DongLiu(manager), //
new
UeterAgrawal
(
manager
),
//
new
UeterAgrawal
(
manager
),
//
new
JiangYi
(
manager
)
//
new
JiangYi
(
manager
)));
));
te
.
vary
RenyiUtilization
(
manager
,
tests
,
200
);
te
.
vary
NumberOfProcessors
(
manager
,
tests
,
200
);
}
}
{
{
SystemManager
<
DagTaskBuilder
>
manager
=
SystemManager
<
DagTaskBuilder
>
manager
=
new
SystemManager
<>(
DagTaskBuilder
.
class
);
new
SystemManager
<>(
DagTaskBuilder
.
class
);
manager
.
setNumberOfProcessors
(
32
);
manager
.
setNumberOfProcessors
(
8
);
TestEnvironment
te
=
new
TestEnvironment
();
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
SchmidMottok
(
new
UnknownStructure
(),
manager
),
//
// new Tester(new UnknownStructure(),manager),
// new MelaniButtazzo(manager), //
// new MelaniButtazzo(manager),,
// new FonsecaNelis(manager), //
// new FonsecaNelis(manager), //
// new DongLiu(manager), //
new
UeterAgrawal
(
manager
),
//
new
UeterAgrawal
(
manager
),
//
new
JiangYi
(
manager
)
//
new
JiangYi
(
manager
)));
));
te
.
vary
RenyiUtilization
(
manager
,
tests
,
200
);
te
.
vary
NumberOfTasks
(
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);
// }
}
}
}
}
src/main/java/mvd/jester/TestEnvironment.java
View file @
75bfd331
...
@@ -16,12 +16,14 @@ import mvd.jester.model.SynchronousTask;
...
@@ -16,12 +16,14 @@ import mvd.jester.model.SynchronousTask;
import
mvd.jester.model.SystemManager
;
import
mvd.jester.model.SystemManager
;
import
mvd.jester.model.Task
;
import
mvd.jester.model.Task
;
import
mvd.jester.model.SystemManager.DagTaskBuilder
;
import
mvd.jester.model.SystemManager.DagTaskBuilder
;
import
mvd.jester.model.SystemManager.DeadlineType
;
import
mvd.jester.model.SystemManager.SynchronousTaskBuilder
;
import
mvd.jester.model.SystemManager.SynchronousTaskBuilder
;
import
mvd.jester.priority.PriorityManager
;
import
mvd.jester.priority.PriorityManager
;
import
mvd.jester.tests.AbstractTest
;
import
mvd.jester.tests.AbstractTest
;
/**
/**
* TestEnvironment
* TestEnvironment
* This class is responsible for running the evaluations on multiple task sets
*/
*/
public
class
TestEnvironment
{
public
class
TestEnvironment
{
...
@@ -33,7 +35,13 @@ public class TestEnvironment {
...
@@ -33,7 +35,13 @@ public class TestEnvironment {
return
new
ArrayList
<>(
tests
);
return
new
ArrayList
<>(
tests
);
}
}
/***
* OUTDATED: For Parallel Synchronous Task model
* @param builder
* @param abstractTestInstances
* @param numberOfProcessors
* @param numberOfTaskSets
*/
public
void
runExperiments
(
final
SynchronousTaskBuilder
builder
,
public
void
runExperiments
(
final
SynchronousTaskBuilder
builder
,
final
Set
<
ResultCollector
<
AbstractTest
<
SynchronousTask
>>>
abstractTestInstances
,
final
Set
<
ResultCollector
<
AbstractTest
<
SynchronousTask
>>>
abstractTestInstances
,
final
long
numberOfProcessors
,
final
long
numberOfTaskSets
)
{
final
long
numberOfProcessors
,
final
long
numberOfTaskSets
)
{
...
@@ -78,6 +86,12 @@ public class TestEnvironment {
...
@@ -78,6 +86,12 @@ public class TestEnvironment {
// resultLogger.logTests(abstractTestInstances);
// 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
,
public
void
measureExecutionTimes
(
final
SystemManager
<
DagTaskBuilder
>
manager
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
long
numberOfMeasurements
)
{
final
long
numberOfMeasurements
)
{
...
@@ -108,6 +122,12 @@ public class TestEnvironment {
...
@@ -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
,
public
void
varyNumberOfProcessors
(
final
SystemManager
<
DagTaskBuilder
>
manager
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
long
numberOfTaskSetsPerStep
)
{
final
long
numberOfTaskSetsPerStep
)
{
...
@@ -124,7 +144,7 @@ public class TestEnvironment {
...
@@ -124,7 +144,7 @@ public class TestEnvironment {
resultMap
.
replaceAll
((
k
,
v
)
->
(
long
)
0
);
resultMap
.
replaceAll
((
k
,
v
)
->
(
long
)
0
);
for
(
int
i
=
0
;
i
<
numberOfTaskSetsPerStep
;
++
i
)
{
for
(
int
i
=
0
;
i
<
numberOfTaskSetsPerStep
;
++
i
)
{
final
Set
<
DagTask
>
taskSet
=
manager
.
getBuilder
().
generateUUnifastTaskSet
(
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"
);
System
.
out
.
print
(
checkedTasksets
+
"/"
+
numberOfTaskSets
+
" tasksets tested!\r"
);
for
(
final
AbstractTest
<
DagTask
>
testInstance
:
abstractTestInstances
)
{
for
(
final
AbstractTest
<
DagTask
>
testInstance
:
abstractTestInstances
)
{
...
@@ -149,7 +169,12 @@ public class TestEnvironment {
...
@@ -149,7 +169,12 @@ public class TestEnvironment {
resultLogger
.
finalize
();
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
,
public
void
varyNumberOfTasks
(
final
SystemManager
<
DagTaskBuilder
>
manager
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
long
numberOfTaskSetsPerStep
)
{
final
long
numberOfTaskSetsPerStep
)
{
...
@@ -191,6 +216,12 @@ public class TestEnvironment {
...
@@ -191,6 +216,12 @@ public class TestEnvironment {
resultLogger
.
finalize
();
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
,
public
void
varyUtilization
(
final
SystemManager
<
DagTaskBuilder
>
manager
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
long
numberOfTaskSetsPerUtil
)
{
final
long
numberOfTaskSetsPerUtil
)
{
...
@@ -231,9 +262,16 @@ public class TestEnvironment {
...
@@ -231,9 +262,16 @@ public class TestEnvironment {
resultLogger
.
finalize
();
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
,
public
void
varyRenyiUtilization
(
final
SystemManager
<
DagTaskBuilder
>
manager
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
long
numberOfTaskSetsPerUtil
)
{
final
long
numberOfTaskSetsPerUtil
,
DeadlineType
deadlineType
)
{
final
long
numberOfProcessors
=
manager
.
getNumberOfProcessors
();
final
long
numberOfProcessors
=
manager
.
getNumberOfProcessors
();
long
checkedTasksets
=
0
;
long
checkedTasksets
=
0
;
final
long
numberOfTaskSets
=
((
numberOfProcessors
*
4
)
-
3
)
*
numberOfTaskSetsPerUtil
;
final
long
numberOfTaskSets
=
((
numberOfProcessors
*
4
)
-
3
)
*
numberOfTaskSetsPerUtil
;
...
@@ -248,7 +286,7 @@ public class TestEnvironment {
...
@@ -248,7 +286,7 @@ public class TestEnvironment {
(
double
)
numberOfProcessors
/
32
)
{
(
double
)
numberOfProcessors
/
32
)
{
resultMap
.
replaceAll
((
k
,
v
)
->
(
long
)
0
);
resultMap
.
replaceAll
((
k
,
v
)
->
(
long
)
0
);
for
(
int
i
=
0
;
i
<
numberOfTaskSetsPerUtil
;
++
i
)
{
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"
);
System
.
out
.
print
(
checkedTasksets
+
"/"
+
numberOfTaskSets
+
" tasksets tested!\r"
);
for
(
final
AbstractTest
<
DagTask
>
testInstance
:
abstractTestInstances
)
{
for
(
final
AbstractTest
<
DagTask
>
testInstance
:
abstractTestInstances
)
{
...
@@ -273,6 +311,13 @@ public class TestEnvironment {
...
@@ -273,6 +311,13 @@ public class TestEnvironment {
resultLogger
.
finalize
();
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
,
public
void
varyPropability
(
final
SystemManager
<
DagTaskBuilder
>
manager
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
List
<
AbstractTest
<
DagTask
>>
abstractTestInstances
,
final
long
numberOfTaskSetsPerStep
)
{
final
long
numberOfTaskSetsPerStep
)
{
...
@@ -288,7 +333,7 @@ public class TestEnvironment {
...
@@ -288,7 +333,7 @@ public class TestEnvironment {
manager
.
setPropability
(
p_add
);
manager
.
setPropability
(
p_add
);
resultMap
.
replaceAll
((
k
,
v
)
->
(
long
)
0
);
resultMap
.
replaceAll
((
k
,
v
)
->
(
long
)
0
);
for
(
int
i
=
0
;
i
<
numberOfTaskSetsPerStep
;
++
i
)
{
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"
);
System
.
out
.
print
(
checkedTasksets
+
"/"
+
numberOfTaskSets
+
" tasksets tested!\r"
);
for
(
final
AbstractTest
<
DagTask
>
testInstance
:
abstractTestInstances
)
{
for
(
final
AbstractTest
<
DagTask
>
testInstance
:
abstractTestInstances
)
{
...
...
src/main/java/mvd/jester/model/SystemManager.java
View file @
75bfd331
This diff is collapsed.
Click to expand it.
src/main/java/mvd/jester/tests/FonsecaNelis.java
View file @
75bfd331
...
@@ -31,6 +31,10 @@ import mvd.jester.utils.BinaryDecompositionTree;
...
@@ -31,6 +31,10 @@ import mvd.jester.utils.BinaryDecompositionTree;
import
mvd.jester.utils.BinaryDecompositionTree.Node
;
import
mvd.jester.utils.BinaryDecompositionTree.Node
;
import
mvd.jester.utils.BinaryDecompositionTree.NodeType
;
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
>
{
public
class
FonsecaNelis
extends
AbstractTest
<
DagTask
>
{
private
final
Map
<
Task
,
TerminationInfo
>
responseTimes
;
private
final
Map
<
Task
,
TerminationInfo
>
responseTimes
;
...
...
src/main/java/mvd/jester/tests/JiangYi.java
View file @
75bfd331
...
@@ -17,6 +17,10 @@ import mvd.jester.model.Task;
...
@@ -17,6 +17,10 @@ import mvd.jester.model.Task;
import
mvd.jester.priority.EarliestDeadlineFirst
;
import
mvd.jester.priority.EarliestDeadlineFirst
;
import
mvd.jester.priority.PriorityManager
;
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
>
{
public
class
JiangYi
extends
AbstractTest
<
DagTask
>
{
private
final
EarliestDeadlineFirst
priorityManager
;
private
final
EarliestDeadlineFirst
priorityManager
;
...
...
src/main/java/mvd/jester/tests/MelaniButtazzo.java
View file @
75bfd331
...
@@ -14,6 +14,10 @@ import mvd.jester.model.Task;
...
@@ -14,6 +14,10 @@ import mvd.jester.model.Task;
import
mvd.jester.priority.PriorityManager
;
import
mvd.jester.priority.PriorityManager
;
import
mvd.jester.priority.RateMonotonic
;
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
>
{
public
class
MelaniButtazzo
extends
AbstractTest
<
DagTask
>
{
private
final
Map
<
Task
,
TerminationInfo
>
responseTimes
;
private
final
Map
<
Task
,
TerminationInfo
>
responseTimes
;
...
...
src/main/java/mvd/jester/tests/SchmidMottok.java
View file @
75bfd331
...
@@ -15,7 +15,7 @@ import mvd.jester.priority.DeadlineMonotonic;
...
@@ -15,7 +15,7 @@ import mvd.jester.priority.DeadlineMonotonic;
import
mvd.jester.priority.PriorityManager
;
import
mvd.jester.priority.PriorityManager
;
/**
/**
*
SchmidMottok
*
Our response time analysis
*/
*/
public
class
SchmidMottok
extends
AbstractTest
<
DagTask
>
{
public
class
SchmidMottok
extends
AbstractTest
<
DagTask
>
{
...
@@ -52,6 +52,10 @@ public class SchmidMottok extends AbstractTest<DagTask> {
...
@@ -52,6 +52,10 @@ public class SchmidMottok extends AbstractTest<DagTask> {
return
"SchmidMottok"
+
"_"
+
structure
.
getType
();
return
"SchmidMottok"
+
"_"
+
structure
.
getType
();
}
}
/***
* Computes the number of threads for each task
* @param tasks The set of tasks
*/
private
void
reassignNumberOfThreads
(
Set
<
DagTask
>
tasks
)
{
private
void
reassignNumberOfThreads
(
Set
<
DagTask
>
tasks
)
{
long
numberOfProcessors
=
manager
.
getNumberOfProcessors
();
long
numberOfProcessors
=
manager
.
getNumberOfProcessors
();
long
occupiedProcessors
=
0
;
long
occupiedProcessors
=
0
;
...
@@ -65,6 +69,12 @@ public class SchmidMottok extends AbstractTest<DagTask> {
...
@@ -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
)
{
private
long
calculateResponseTime
(
final
Set
<
DagTask
>
tasks
,
final
DagTask
task
)
{
final
long
minimumWcet
=
task
.
getCriticalPath
();
final
long
minimumWcet
=
task
.
getCriticalPath
();
long
responseTime
=
minimumWcet
;
long
responseTime
=
minimumWcet
;
...
...
src/main/java/mvd/jester/tests/TypeFunction.java
View file @
75bfd331
...
@@ -9,6 +9,10 @@ import mvd.jester.model.Segment;
...
@@ -9,6 +9,10 @@ import mvd.jester.model.Segment;
import
mvd.jester.model.SystemManagerInterface
;
import
mvd.jester.model.SystemManagerInterface
;
import
mvd.jester.model.Task
;
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
interface
TypeFunction
{
public
double
getTaskInterference
(
final
DagTask
task
,
public
double
getTaskInterference
(
final
DagTask
task
,
...
@@ -79,6 +83,9 @@ public interface TypeFunction {
...
@@ -79,6 +83,9 @@ public interface TypeFunction {
}
}
}
}
/***
* This class is presented in the paper
*/
public
class
UnknownStructure
implements
TypeFunction
{
public
class
UnknownStructure
implements
TypeFunction
{
@Override
@Override
...
...
src/main/java/mvd/jester/tests/UeterAgrawal.java
View file @
75bfd331
...
@@ -18,6 +18,10 @@ import mvd.jester.model.Task;
...
@@ -18,6 +18,10 @@ import mvd.jester.model.Task;
import
mvd.jester.priority.EarliestDeadlineFirst
;
import
mvd.jester.priority.EarliestDeadlineFirst
;
import
mvd.jester.priority.PriorityManager
;
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
>
{
public
class
UeterAgrawal
extends
AbstractTest
<
DagTask
>
{
private
final
EarliestDeadlineFirst
priorityManager
;
private
final
EarliestDeadlineFirst
priorityManager
;
...
@@ -101,7 +105,6 @@ public class UeterAgrawal extends AbstractTest<DagTask> {
...
@@ -101,7 +105,6 @@ public class UeterAgrawal extends AbstractTest<DagTask> {
final
long
second
=
(
long
)
Math
final
long
second
=
(
long
)
Math
.
ceil
(((
double
)
workload
-
criticalPath
)
/
(
criticalPath
*
(
strechRatio
-
1
)));
.
ceil
(((
double
)
workload
-
criticalPath
)
/
(
criticalPath
*
(
strechRatio
-
1
)));
// TODO: what are those boundaries?
final
long
max
=
Math
.
max
(
first
,
second
);
final
long
max
=
Math
.
max
(
first
,
second
);
return
max
;
return
max
;
...
@@ -160,6 +163,10 @@ public class UeterAgrawal extends AbstractTest<DagTask> {
...
@@ -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
)
{
private
void
assignThreadsAndStretchRatio
(
Set
<
DagTask
>
tasks
)
{
for
(
DagTask
t
:
tasks
)
{
for
(
DagTask
t
:
tasks
)
{
final
long
criticalPath
=
t
.
getCriticalPath
();
final
long
criticalPath
=
t
.
getCriticalPath
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment