private int priority() {
		sortPriority sp = new sortPriority();
		Queue<ProcessControlBlock> priorityQueue = new PriorityQueue<ProcessControlBlock>(pcbList.getPCBList().size(), sp);
		Iterator<ProcessControlBlock> itr = pcbList.getPCBList().values().iterator();
		
		// Add all PCBs to queue
		while (itr.hasNext())
			priorityQueue.offer(itr.next());
		
		// Remove blocked PCBs until non-blocked PCB found
		while (priorityQueue.peek().getState() == ProcessState.BLOCKED)
			priorityQueue.remove();
		
		return priorityQueue.poll().getPid();
	}