private int startQueuedGridlets() {
    	int nStarted = 0;
    	
    	Iterator<SSGridlet> iter = waitingJobs.iterator();
		while (iter.hasNext()) {
			SSGridlet gridlet = iter.next();
    		if(gridlet.getStartTime() >= 0 && gridlet.getStartTime() <= GridSim.clock()) {
    			runningJobs.add(gridlet);
    			iter.remove();
    			nStarted++;
    	        gridlet.setStatus(Gridlet.INEXEC);
    	        // schedule an update-scheduling-queue event
    	        super.sendInternalEvent(gridlet.getActualFinishTime()-GridSim.clock(), UPT_SCHEDULE);
    		}
    	}

    	return nStarted;
    }