Select Git revision
Global.java 669 B
/**
* the global scheduler
* It will distribute the incoming tasks between the two schedulers (RR & SRTF) and select which one may determine the active task
*/
public class Global {
private SRTF srtf = new SRTF(); //high priority scheduler
private RR rr = new RR(); //low priority scheduler
String history = ""; //a string with tha names of task that have taken control so far - I will use this only for the output
public void add(Task t) {
if (t.isKernel)
srtf.add(t);
else
rr.add(t);
}
public void tick() {
}
/**
* A task is forcibly taking control
* @param t the task to be run
*/
public void changeRunning(Task t) {
}
}