Skip to content
Snippets Groups Projects
Select Git revision
  • 6834b62dda278ffab6fe5a86b7c4eec7d2a5a19f
  • master default protected
  • blint
  • Balazs
  • Tomi
  • Mike
  • Blint-tmp
  • Patrik
  • w14
  • w13
  • w11
  • w10
  • w9
  • w7
  • w5
  • w6
  • w4
  • w3
  • w2
19 results

projlab.tex

Blame
  • 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) {
    	
    	}
    	
    }