public synchronized void gridletPause(int gridletId, int userId, boolean ack)
	    {
	        boolean status = false;

	        // Find in EXEC List first
	        int found = gridletInExecList_.indexOf(gridletId, userId);
	        if (found >= 0)
	        {
	            // updates all the Gridlets first before pausing
	            updateGridletProcessing();

	            // Removes the Gridlet from the execution list
	            ResGridlet rgl = (ResGridlet) gridletInExecList_.remove(found);

	            if (rgl.getRemainingGridletLength() == 0.0)
	            {
	                found = -1;  // meaning not found in Queue List
	    	        rgl.setGridletStatus(Gridlet.SUCCESS);
	    	        rgl.finalizeGridlet();
	    	        super.sendFinishGridlet( rgl.getGridlet() );

	    	        logger.log(Level.INFO,super.resName_
	                        + ".PerfectCheckpointing.gridletPause(): Cannot pause"
	                        + " Gridlet #" + gridletId + " for User #" + userId
	                        + " since it has FINISHED.");
	            }
	            else
	            {
	                status = true;
	                rgl.setGridletStatus(Gridlet.PAUSED);  // change the status
	                gridletPausedList_.add(rgl);   // add into the paused list

	            }
	        }
	        else {      // Find in QUEUE list
	            found = gridletQueueList_.indexOf(gridletId, userId);
	        }

	        // if found in the Queue List
	        if (!status && found >= 0)
	        {
	            status = true;

	            // removes the Gridlet from the Queue list
	            ResGridlet rgl = (ResGridlet) gridletQueueList_.remove(found);
	            rgl.setGridletStatus(Gridlet.PAUSED);   // change the status
	            gridletPausedList_.add(rgl);            // add into the paused list
	        }
	        // if not found anywhere in both exec and paused lists
	        else if (found == -1)
	        {
	        	logger.log(Level.INFO,super.resName_ +
	                    ".PerfectCheckpointing.gridletPause(): Error - cannot " +
	                    "find Gridlet #" + gridletId + " for User #" + userId);
	        }

	        // sends back an ack if required
	        if (ack)
	        {
	            super.sendAck(GridSimTags.GRIDLET_PAUSE_ACK, status,
	                          gridletId, userId);
	        }
	    }