public ProfileEntry checkAvailability(int reqPE, double startTime, 
			long duration) {
		
		Iterator<ProfileEntry> it = avail.itValuesFromPrec(startTime);
		if (!it.hasNext()) {
			return null;
		}
		
		PERangeList intersec = it.next().getAvailRanges().clone();
        double finishTime = startTime + duration;
            
        // Scans the availability profile until the expected termination
        // of the job to check whether enough PEs will be available for it. 
        while(it.hasNext()) {
        	ProfileEntry entry = it.next();
        	if(entry.getTime() >= finishTime || intersec.getNumPE() < reqPE) {
        		break;
        	}
        	intersec = intersec.intersection(entry.getAvailRanges());
        }
        return (intersec.getNumPE() >= reqPE) ?
        		new Entry(startTime, intersec) : null;
	}