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
fe6b5585
authored
Aug 13, 2020
by
Michael Schmid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deleted old files and minor changes
parent
b00f2d0e
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
0 additions
and
821 deletions
+0
-821
src/main/java/mvd/jester/simulator/AbstractSimulator.java
+0
-129
src/main/java/mvd/jester/simulator/DynamicForkJoin.java
+0
-37
src/main/java/mvd/jester/simulator/GlobalScheduler.java
+0
-2
src/main/java/mvd/jester/simulator/ParallelSynchronous.java
+0
-36
src/main/java/mvd/jester/simulator/SimulatorInterface.java
+0
-15
src/main/java/mvd/jester/simulator/events/ISubtaskEvent.java
+0
-1
src/main/java/mvd/jester/simulator/internals/SortedTaskContextSet.java
+0
-17
src/main/java/mvd/jester/simulator/internals/dynamicforkjoin/JobContext.java
+0
-129
src/main/java/mvd/jester/simulator/internals/dynamicforkjoin/SegmentContext.java
+0
-79
src/main/java/mvd/jester/simulator/internals/dynamicforkjoin/TaskContext.java
+0
-88
src/main/java/mvd/jester/simulator/internals/dynamicforkjoin/TaskletContext.java
+0
-62
src/main/java/mvd/jester/simulator/internals/parallelsynchronous/JobContext.java
+0
-97
src/main/java/mvd/jester/simulator/internals/parallelsynchronous/SegmentContext.java
+0
-43
src/main/java/mvd/jester/simulator/internals/parallelsynchronous/TaskContext.java
+0
-86
No files found.
src/main/java/mvd/jester/simulator/AbstractSimulator.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator;
// import java.util.Comparator;
// import java.util.HashSet;
// import java.util.Set;
// import java.util.TreeSet;
// import com.google.common.collect.TreeMultiset;
// import mvd.jester.model.SystemManager;
// import mvd.jester.priority.PriorityManager;
// import mvd.jester.priority.RateMonotonic;
// import mvd.jester.TypeInterface;
// import mvd.jester.info.SchedulingInfo;
// import mvd.jester.simulator.model.ProcessorContext;
// import mvd.jester.simulator.internals.ITaskContext;
// /**
// * AbstractSimulator
// */
// public abstract class AbstractSimulator implements SimulatorInterface, TypeInterface {
// protected final SystemManager systemSetup;
// protected final Set<ProcessorContext> processors;
// protected TreeMultiset<ITaskContext> readyTasks;
// AbstractSimulator(SystemManager systemSetup) {
// this.systemSetup = systemSetup;
// this.readyTasks = TreeMultiset.create((t1, t2) -> new RateMonotonic().compare(t1, t2));
// processors = new HashSet<>();
// for (int i = 0; i < systemSetup.getNumberOfProcessors(); ++i) {
// processors.add(new ProcessorContext(i));
// }
// }
// protected abstract boolean releaseTasks(long timeStep);
// @Override
// public SchedulingInfo runSimulation(PriorityManager priorityManager) {
// // SchedulingInfo schedulingInfo = new SchedulingInfo(systemSetup.getParallelTaskRatio(),
// // systemSetup.getUtilization());
// // long hyperPeriod = init(priorityManager);
// // for (int t = 0; t < hyperPeriod; ++t) {
// // if (!releaseTasks(t)) {
// // throw new RuntimeException("Could not release a task. This should not happen!");
// // }
// // Set<ProcessorContext> sortedProcessors = sortProcessors(processors);
// // for (ProcessorContext p : sortedProcessors) {
// // for (TaskContextInterface tc : readyTasks) {
// // if (p.acceptTask(tc, t)) {
// // break;
// // }
// // }
// // }
// // for (ProcessorContext p : processors) {
// // Optional<TaskContextInterface> optionalTc = p.updateExecution(t);
// // if (optionalTc.isPresent()) {
// // TaskContextInterface tc = optionalTc.get();
// // if (t >= tc.getDeadline()) {
// // TerminationInfo terminationInfo =
// // new TerminationInfo(tc.getReleaseTime(), tc.getDeadline(), t);
// // schedulingInfo.addTerminationInfo(terminationInfo);
// // EventPrinter.print("Time " + t + ": Task " + tc + " failed its deadline!");
// // schedulingInfo.setFailedTerminationInfo(terminationInfo);
// // return schedulingInfo;
// // }
// // readyTasks.remove(optionalTc.get());
// // }
// // }
// // }
// // return schedulingInfo;
// return null;
// }
// private long init(PriorityManager priorityManager) {
// this.readyTasks = TreeMultiset.create((t1, t2) -> priorityManager.compare(t1, t2));
// for (ProcessorContext p : processors) {
// p.setJob(null);
// }
// return getHyperPeriod();
// }
// private Set<ProcessorContext> sortProcessors(Set<ProcessorContext> processors) {
// Set<ProcessorContext> sortedProcessors = new TreeSet<>(new ProcessorComparator());
// processors.forEach(p -> sortedProcessors.add(p));
// return sortedProcessors;
// }
// private long getHyperPeriod() {
// // return
// // systemSetup.getTasks().stream().max(Comparator.comparing(SynchronousTask::getPeriod))
// // .get().getPeriod() * 10;
// return 10;
// }
// private class ProcessorComparator implements Comparator<ProcessorContext> {
// @Override
// public int compare(ProcessorContext p1, ProcessorContext p2) {
// if (!p1.getSubtask().isPresent()) {
// return -1;
// } else if (!p2.getSubtask().isPresent()) {
// return 1;
// } else {
// long p1Period = p1.getSubtask().get().getJobContext().getTask().getPeriod();
// long p2Period = p2.getSubtask().get().getJobContext().getTask().getPeriod();
// if (p1Period == p2Period) {
// return 1;
// } else {
// return (int) (p2.getSubtask().get().getJobContext().getTask().getPeriod()
// - p1.getSubtask().get().getJobContext().getTask().getPeriod());
// }
// }
// }
// }
// }
src/main/java/mvd/jester/simulator/DynamicForkJoin.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator;
// import mvd.jester.model.SystemManager;
// /**
// * SchmidMottok
// */
// public class DynamicForkJoin extends AbstractSimulator {
// public DynamicForkJoin(SystemManager systemSetup) {
// super(systemSetup);
// }
// @Override
// protected boolean releaseTasks(long timeStep) {
// // // for (SynchronousTask t : systemSetup.getTasks()) {
// // if (timeStep % t.getPeriod() == 0) {
// // TaskContext tc = new TaskContext(t, systemSetup.getNumberOfProcessors(), timeStep);
// // if (!readyTasks.add(tc)) {
// // EventPrinter
// // .print("Time " + timeStep + ": Task " + tc + " could not be released!");
// // return false;
// // }
// // EventPrinter.print("Time " + timeStep + ": Task " + tc + " released!");
// // }
// // }
// return true;
// }
// @Override
// public String getName() {
// return "SchmidMottok";
// }
// }
src/main/java/mvd/jester/simulator/GlobalScheduler.java
View file @
fe6b5585
...
...
@@ -4,9 +4,7 @@ import java.util.HashSet;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.SortedSet
;
import
java.util.TreeSet
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
import
org.jgrapht.Graphs
;
import
mvd.jester.model.DagTask
;
...
...
src/main/java/mvd/jester/simulator/ParallelSynchronous.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator;
// import mvd.jester.model.SystemManager;
// /**
// * MaiaBertogna
// */
// public class ParallelSynchronous extends AbstractSimulator {
// public ParallelSynchronous(SystemManager systemSetup) {
// super(systemSetup);
// }
// @Override
// protected boolean releaseTasks(long timeStep) {
// // for (SynchronousTask t : systemSetup.getTasks()) {
// // if (timeStep % t.getPeriod() == 0) {
// // TaskContext tc = new TaskContext(t, timeStep);
// // if (!readyTasks.add(tc)) {
// // EventPrinter
// // .print("Time " + timeStep + ": Task " + tc + " could not be released!");
// // return false;
// // }
// // EventPrinter.print("Time " + timeStep + ": Task " + tc + " released!");
// // }
// // }
// return true;
// }
// @Override
// public String getName() {
// return "MaiaBertogna";
// }
// }
src/main/java/mvd/jester/simulator/SimulatorInterface.java
deleted
100644 → 0
View file @
b00f2d0e
package
mvd
.
jester
.
simulator
;
import
mvd.jester.info.SchedulingInfo
;
import
mvd.jester.priority.PriorityManager
;
/**
* SimulatorInterface
*/
public
interface
SimulatorInterface
{
public
SchedulingInfo
runSimulation
(
PriorityManager
priorityManager
);
public
String
getName
();
}
src/main/java/mvd/jester/simulator/events/ISubtaskEvent.java
View file @
fe6b5585
package
mvd
.
jester
.
simulator
.
events
;
import
mvd.jester.simulator.model.ExtendedSubtaskContext
;
import
mvd.jester.simulator.model.JobContext
;
public
interface
ISubtaskEvent
extends
IEvent
{
...
...
src/main/java/mvd/jester/simulator/internals/SortedTaskContextSet.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator.internals;
// import java.util.TreeSet;
// import mvd.jester.priority.PriorityManager;
// /**
// * SortedTaskContextSet
// */
// public class SortedTaskContextSet extends TreeSet<ITaskContext> {
// private static final long serialVersionUID = 4808544133562675597L;
// public SortedTaskContextSet(PriorityManager priorityMananger) {
// super((t1, t2) -> priorityMananger.compare(t1, t2));
// }
// }
src/main/java/mvd/jester/simulator/internals/dynamicforkjoin/JobContext.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator.internals.dynamicforkjoin;
// import java.util.Optional;
// import mvd.jester.simulator.EventPrinter;
// import mvd.jester.simulator.internals.ISubtaskContext;
// import mvd.jester.simulator.internals.ProcessorContext;
// import mvd.jester.simulator.internals.ITaskContext;
// /**
// * Job
// *
// * @param <Job>
// */
// public class JobContext implements ISubtaskContext {
// private final TaskContext taskContext;
// private final SegmentContext segmentContext;
// private final long wcet;
// private Optional<ProcessorContext> currentProcessor;
// private Optional<TaskletContext> currentTasklet;
// public JobContext(TaskContext taskContext, SegmentContext segmentContext) {
// this.currentProcessor = Optional.empty();
// this.currentTasklet = Optional.empty();
// this.taskContext = taskContext;
// this.segmentContext = segmentContext;
// this.wcet = segmentContext.getSegment().getJobWcet();
// }
// public Optional<ITaskContext> updateExecution(long time) {
// boolean jobIsIdle = true;
// if (currentTasklet.isPresent()) {
// jobIsIdle = currentTasklet.get().updateExecution(time);
// }
// if (jobIsIdle) {
// currentTasklet = segmentContext.getNextTasklet();
// Optional<ITaskContext> tc = taskContext.acceptNotification(time);
// if (currentTasklet.isPresent()) {
// EventPrinter.print("Time " + time + ": Job " + this + " started executing tasklet "
// + currentTasklet.get() + " on Processor " + currentProcessor.get());
// currentTasklet.get().setCurrentJob(this);
// } else {
// if (currentProcessor.isPresent()) {
// currentProcessor.get().setJob(null);
// }
// currentProcessor = Optional.empty();
// return tc;
// }
// }
// return Optional.empty();
// }
// public boolean checkExecutionTime() {
// if (currentTasklet.isPresent()) {
// return currentTasklet.get().checkExecutionTime();
// }
// return false;
// }
// /**
// * @return the wcet
// */
// public long getWcet() {
// return wcet;
// }
// /**
// * @param processor the currentProcessor to set
// */
// public void setCurrentProcessor(ProcessorContext processor) {
// this.currentProcessor = Optional.ofNullable(processor);
// }
// /**
// * @return the currentProcessor
// */
// public Optional<ProcessorContext> getCurrentProcessor() {
// return currentProcessor;
// }
// /**
// * @param currentTasklet the currentTasklet to set
// */
// public void setCurrentTasklet(TaskletContext currentTasklet) {
// this.currentTasklet = Optional.ofNullable(currentTasklet);
// }
// /**
// * @return the segmentContext
// */
// public SegmentContext getSegmentContext() {
// return segmentContext;
// }
// /**
// * @return the taskContext
// */
// public TaskContext getTaskContext() {
// return taskContext;
// }
// @Override
// public String toString() {
// return "(of task=" + taskContext + ")";
// }
// @Override
// public boolean prepareJob(long time) {
// if (!currentTasklet.isPresent()) {
// currentTasklet = segmentContext.getNextTasklet();
// if (currentTasklet.isPresent()) {
// currentTasklet.get().setCurrentJob(this);
// // EventPrinter.print("Time " + time + ": Job " + this + " started executing
// // tasklet"
// // + currentTasklet.get());
// return true;
// } else {
// return false;
// }
// }
// return true;
// }
// }
src/main/java/mvd/jester/simulator/internals/dynamicforkjoin/SegmentContext.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator.internals.dynamicforkjoin;
// import java.util.HashSet;
// import java.util.Optional;
// import java.util.Set;
// import mvd.jester.model.Segment;
// import mvd.jester.simulator.internals.ISubtaskContext;
// /**
// * Segment
// */
// public class SegmentContext {
// private final Segment segment;
// private final Set<ISubtaskContext> jobs;
// private final Set<TaskletContext> tasklets;
// public SegmentContext(TaskContext taskContext, Segment segment, long numberOfProcessors) {
// this.segment = segment;
// jobs = new HashSet<>();
// tasklets = new HashSet<>();
// long numberOfJobs = segment.getNumberOfJobs() > numberOfProcessors ? numberOfProcessors
// : segment.getNumberOfJobs();
// for (int j = 0; j < numberOfJobs; ++j) {
// jobs.add(new JobContext(taskContext, this));
// }
// // for (int j = 0; j < segment.getNumberOfTasklets(); ++j) {
// // tasklets.add(new TaskletContext(taskContext, this));
// // }
// }
// /**
// * @return the segment
// */
// public Segment getSegment() {
// return segment;
// }
// public long getNumberOfJobs() {
// return jobs.size();
// }
// public Optional<ISubtaskContext> getNextJob() {
// boolean taskletAvailable = tasklets.stream()
// .anyMatch(t -> !t.getCurrentJob().isPresent() && t.checkExecutionTime());
// boolean jobNotFinished = jobs.stream()
// .anyMatch(j -> !j.getCurrentProcessor().isPresent() && j.checkExecutionTime());
// if (jobNotFinished) {
// return jobs.stream()
// .filter(j -> !j.getCurrentProcessor().isPresent() && j.checkExecutionTime())
// .findFirst();
// } else if (taskletAvailable) {
// return jobs.stream()
// .filter(j -> !j.getCurrentProcessor().isPresent() && !j.checkExecutionTime())
// .findFirst();
// } else {
// return Optional.empty();
// }
// }
// public Optional<TaskletContext> getNextTasklet() {
// return tasklets.stream()
// .filter(t -> !t.getCurrentJob().isPresent() && t.checkExecutionTime()).findFirst();
// }
// @Override
// public String toString() {
// return "something";
// // return "(nJobs=" + segment.getNumberOfJobs() + ", nTasklets="
// // + segment.getNumberOfTasklets() + ", taskletWcet=" + segment.getTaskletWcet() + ")";
// }
// }
src/main/java/mvd/jester/simulator/internals/dynamicforkjoin/TaskContext.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator.internals.dynamicforkjoin;
// import java.util.ArrayList;
// import java.util.Optional;
// import mvd.jester.model.Segment;
// import mvd.jester.model.SynchronousTask;
// import mvd.jester.simulator.EventPrinter;
// import mvd.jester.simulator.internals.ISubtaskContext;
// import mvd.jester.simulator.internals.ITaskContext;
// /**
// * TaskContext
// */
// public class TaskContext implements ITaskContext {
// private final SynchronousTask task;
// private final ArrayList<SegmentContext> segments;
// private final long releaseTime;
// private final long deadline;
// private int currentSegment;
// private int segmentCounter;
// public TaskContext(SynchronousTask task, long numberOfProcessors, long releaseTime) {
// this.task = task;
// this.segments = new ArrayList<>();
// this.currentSegment = 0;
// this.segmentCounter = 0;
// this.deadline = releaseTime + task.getDeadline();
// this.releaseTime = releaseTime;
// for (Segment s : task.getWorkloadDistribution()) {
// segments.add(new SegmentContext(this, s, numberOfProcessors));
// }
// }
// /**
// * @return the task
// */
// public SynchronousTask getTask() {
// return task;
// }
// /**
// * @return the deadline
// */
// @Override
// public long getDeadline() {
// return deadline;
// }
// @Override
// public long getReleaseTime() {
// return releaseTime;
// }
// public Optional<ITaskContext> acceptNotification(long time) {
// segmentCounter++;
// // if (segmentCounter >= segments.get(currentSegment).getSegment().getNumberOfTasklets()) {
// // currentSegment++;
// // segmentCounter = 0;
// // if (currentSegment >= segments.size()) {
// // EventPrinter.print("Time " + time + ": Task " + this + "finished!");
// // return Optional.of(this);
// // }
// // }
// return Optional.empty();
// }
// public Optional<ISubtaskContext> getNextJob() {
// if (currentSegment < segments.size()) {
// return segments.get(currentSegment).getNextJob();
// }
// return Optional.empty();
// }
// @Override
// public String toString() {
// return "(period=" + task.getPeriod() + ", deadline=" + deadline + ", segments="
// + segments.size() + ")";
// }
// }
src/main/java/mvd/jester/simulator/internals/dynamicforkjoin/TaskletContext.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator.internals.dynamicforkjoin;
// import java.util.Optional;
// /**
// * Tasklet
// */
// public class TaskletContext {
// private final TaskContext taskContext;
// private Optional<JobContext> currentJob;
// private final long wcet;
// private long executionTime;
// public TaskletContext(TaskContext taskContext, SegmentContext segment) {
// this.taskContext = taskContext;
// this.wcet = 88;
// // segment.getSegment().getTaskletWcet();
// this.executionTime = wcet;
// currentJob = Optional.empty();
// }
// /**
// * @return the currentJob
// */
// public Optional<JobContext> getCurrentJob() {
// return currentJob;
// }
// public void setCurrentJob(JobContext jobContext) {
// currentJob = Optional.ofNullable(jobContext);
// }
// /**
// * @return true if tasklet finished, false otherwise
// */
// public boolean updateExecution(long time) {
// executionTime--;
// if (executionTime == 0) {
// if (currentJob.isPresent()) {
// currentJob.get().setCurrentTasklet(null);
// }
// currentJob = Optional.empty();
// return true;
// } else if (executionTime < 0) {
// throw new RuntimeException("Tasklet was executed for longer than its WCET!");
// }
// return false;
// }
// public boolean checkExecutionTime() {
// return executionTime > 0;
// }
// @Override
// public String toString() {
// return "(wcet=" + wcet + ", task=" + taskContext + ")";
// }
// }
src/main/java/mvd/jester/simulator/internals/parallelsynchronous/JobContext.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator.internals.parallelsynchronous;
// import java.util.Optional;
// import mvd.jester.simulator.EventPrinter;
// import mvd.jester.simulator.internals.ISubtaskContext;
// import mvd.jester.simulator.internals.ProcessorContext;
// import mvd.jester.simulator.internals.ITaskContext;
// /**
// * Job
// *
// * @param <Job>
// */
// public class JobContext implements ISubtaskContext {
// private final TaskContext taskContext;
// private final SegmentContext segmentContext;
// private final long wcet;
// private Optional<ProcessorContext> currentProcessor;
// private long executionTime;
// public JobContext(TaskContext taskContext, SegmentContext segmentContext) {
// this.currentProcessor = Optional.empty();
// this.taskContext = taskContext;
// this.segmentContext = segmentContext;
// this.wcet = segmentContext.getSegment().getJobWcet();
// this.executionTime = wcet;
// }
// public Optional<ITaskContext> updateExecution(long time) {
// executionTime--;
// if (executionTime == 0) {
// EventPrinter.print("Time " + time + ": " + currentProcessor.get()
// + " finished execution of job " + this + "!");
// currentProcessor.get().setJob(null);
// currentProcessor = Optional.empty();
// return taskContext.acceptNotification(time);
// } else if (executionTime < 0) {
// throw new RuntimeException("Job was executed for longer than its WCET!");
// }
// return Optional.empty();
// }
// public boolean checkExecutionTime() {
// return executionTime > 0;
// }
// /**
// * @return the wcet
// */
// public long getWcet() {
// return wcet;
// }
// /**
// * @param processor the currentProcessor to set
// */
// public void setCurrentProcessor(ProcessorContext processor) {
// this.currentProcessor = Optional.ofNullable(processor);
// }
// /**
// * @return the currentProcessor
// */
// public Optional<ProcessorContext> getCurrentProcessor() {
// return currentProcessor;
// }
// /**
// * @return the segmentContext
// */
// public SegmentContext getSegmentContext() {
// return segmentContext;
// }
// /**
// * @return the taskContext
// */
// public TaskContext getTaskContext() {
// return taskContext;
// }
// @Override
// public String toString() {
// return "(jobWcet=" + wcet + ", of task=" + taskContext + ")";
// }
// @Override
// public boolean prepareJob(long time) {
// return true;
// }
// }
src/main/java/mvd/jester/simulator/internals/parallelsynchronous/SegmentContext.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator.internals.parallelsynchronous;
// import java.util.HashSet;
// import java.util.Optional;
// import java.util.Set;
// import mvd.jester.model.Segment;
// import mvd.jester.simulator.internals.ISubtaskContext;
// /**
// * Segment
// */
// public class SegmentContext {
// private final Segment segment;
// private final Set<ISubtaskContext> jobs;
// public SegmentContext(TaskContext taskContext, Segment segment) {
// this.segment = segment;
// jobs = new HashSet<>();
// for (int j = 0; j < segment.getNumberOfJobs(); ++j) {
// jobs.add(new JobContext(taskContext, this));
// }
// }
// /**
// * @return the segment
// */
// public Segment getSegment() {
// return segment;
// }
// public Optional<ISubtaskContext> getNextJob() {
// return jobs.stream()
// .filter(j -> !j.getCurrentProcessor().isPresent() && j.checkExecutionTime())
// .findFirst();
// }
// @Override
// public String toString() {
// return "(nJobs=" + segment.getNumberOfJobs() + ", jobWcet=" + segment.getJobWcet() + ")";
// }
// }
src/main/java/mvd/jester/simulator/internals/parallelsynchronous/TaskContext.java
deleted
100644 → 0
View file @
b00f2d0e
// package mvd.jester.simulator.internals.parallelsynchronous;
// import java.util.ArrayList;
// import java.util.Optional;
// import mvd.jester.model.Segment;
// import mvd.jester.model.SynchronousTask;
// import mvd.jester.simulator.EventPrinter;
// import mvd.jester.simulator.internals.ISubtaskContext;
// import mvd.jester.simulator.internals.ITaskContext;
// /**
// * TaskContext
// */
// public class TaskContext implements ITaskContext {
// private final SynchronousTask task;
// private final ArrayList<SegmentContext> segments;
// private final long deadline;
// private final long releaseTime;
// private int currentSegment;
// private int segmentCounter;
// public TaskContext(SynchronousTask task, long releaseTime) {
// this.task = task;
// this.segments = new ArrayList<>();
// this.currentSegment = 0;
// this.segmentCounter = 0;
// this.releaseTime = releaseTime;
// this.deadline = releaseTime + task.getDeadline();
// for (Segment s : task.getWorkloadDistribution()) {
// segments.add(new SegmentContext(this, s));
// }
// }
// /**
// * @return the task
// */
// public SynchronousTask getTask() {
// return task;
// }
// /**
// * @return the deadline
// */
// @Override
// public long getDeadline() {
// return deadline;
// }
// @Override
// public long getReleaseTime() {
// return releaseTime;
// }
// public Optional<ITaskContext> acceptNotification(long time) {
// segmentCounter++;
// if (segmentCounter >= segments.get(currentSegment).getSegment().getNumberOfJobs()) {
// currentSegment++;
// segmentCounter = 0;
// if (currentSegment >= segments.size()) {
// EventPrinter.print("Time " + time + ": Task " + this + "finished!");
// return Optional.of(this);
// }
// }
// return Optional.empty();
// }
// public Optional<ISubtaskContext> getNextJob() {
// if (currentSegment < segments.size()) {
// return segments.get(currentSegment).getNextJob();
// }
// return Optional.empty();
// }
// @Override
// public String toString() {
// return "(period=" + task.getPeriod() + ", deadline=" + deadline + ", segments="
// + segments.size() + ")";
// }
// }
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