code: public Task poll() {
      	Task result=null;
      	if(activeIndex==0)
      	{
      		result=taskList[0].poll();
      		if(result!=null)
      			result.removeFromQueue0();    		
      	}
      	else
      	{
      		result=taskList[1].poll();
      		if(result!=null)
      			result.removeFromQueue1();
      	}
      	
      	return result;     		    
      }
docs: Retrieves the task with earliest dead line and removes it from queue.
  
  @return task which has earliest dead line