private void updateQueues()
	{

		while(!taskSet.isEmpty() && taskSet.peek().getArrivalTime() <= currentTime)
		{
			if(isPreSatisfied(taskSet.peek()))
			{
				readyQueue.addLast(taskSet.poll());
			}
			else
			{
				Task t = taskSet.poll();
				t.setWaiting();
				waitQueue.addLast(t);
			}
		}
		
		for(Task t : waitQueue)
		{
			if(isPreSatisfied(t))
				readyQueue.addLast(t);
		}
		
		for(Task t : readyQueue)
		{
			waitQueue.remove(t);
		}
		
		if(currentTask != null)
		{
			/* current task not preempted*/
			if(currentTask.getDeadline() <= getMinDeadline(currentTask.getDeadline()))
			{
				readyQueue.addFirst(currentTask);
			}
			else
			{
				/*current task gets preempted, add to end of the queue*/
				System.out.println(currentTime + " " + currentTask.getName() + " gets preempted");
				currentTask.setReady();
				readyQueue.addLast(currentTask);
			}
		}
		
		Collections.sort(readyQueue, new Comparator<Task>(){
			public int compare(Task t1, Task t2)
			{
				return t1.getDeadline() - t2.getDeadline();
			}
		});
	}