@Override
	public void run() {
		int triggerPoint = 0;
		
		while (bKill) {

			//Get next process to run
			int PID = scheduler.getNextProcessID(); //Temp until scheduler interface changes

			//Retrieve PCB for current process
			ProcessControlBlock pcb = pcbList.getPCB(PID);

			//Get trigger point
			triggerPoint = pcb.getProcess().getTriggerPoint();

			//Get current PC
			PC = pcb.getNextStep();
			
			//Set current process to running state
			pcb.setState(ProcessState.RUNNING);
			
			//Print output of process state
			System.out.println("Scheduler: Running process " + pcb.getPid() + " (" + pcb.getProcess().getProcessType() + ") next.");
			System.out.print(pcbList.toString());
				
			//Loop through all instructions
			while(PC != GenericProcess.MAX_INSTRUCTIONS - 1) {
			  
				if (PC == triggerPoint) {
					//Make system call based on process type
					systemCall(PID); 
					
					if (pcb.getState() == ProcessState.BLOCKED) {
						//System.out.println("Process " + pcb.getPid() + " is now BLOCKED. Switching processes");
						break;
					}
					
				} else if (bInterrupted && scheduler.getCurrentSchedulerPolicy() == SchedulePolicy.ROUND_ROBIN) {
					System.out.println("Process " + pcb.getPid() + " was interrupted");
					bInterrupted = false;
					pcb.setState(ProcessState.RUNNABLE);
				  break;		
				} else if (scheduler.getCurrentSchedulerPolicy() == SchedulePolicy.LOTTERY 
				    || scheduler.getCurrentSchedulerPolicy() == SchedulePolicy.PRIORITY 
				    && PC == GenericProcess.MAX_INSTRUCTIONS - 1 ) { 
				    PC = 0; //Reset PC
				    pcb.setState(ProcessState.RUNNABLE);
				    //System.out.println("Process " + pcb.getPid() + " completed");
				    break;
				}

				PC = (PC + 1) % (GenericProcess.MAX_INSTRUCTIONS - 1);
				
			}
			
			pcb.setNextStep(PC);
		}
	}