Index: DCWoRMS/branches/coolemall/src/simulator/stats/DCwormsMetricsCalculator.java
===================================================================
--- DCWoRMS/branches/coolemall/src/simulator/stats/DCwormsMetricsCalculator.java	(revision 1278)
+++ DCWoRMS/branches/coolemall/src/simulator/stats/DCwormsMetricsCalculator.java	(revision 1377)
@@ -48,7 +48,8 @@
 				roomPower = roomPower + acc.getSum();
 			}
-			metric = new MetricsStats("CoolEmAllTestbed", "Total_energy_consumption", roomPower, timestamp, "Wh");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "Total_energy_consumption", -1, timestamp, "Wh");
+			
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_energy_consumption - not implemented yet", 0, timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_energy_consumption - not implemented yet", -1, timestamp, "Wh");
 		}
 		return metric;
@@ -63,7 +64,7 @@
 				itComputingPower = itComputingPower + acc.getSum();
 			}
-			metric = new MetricsStats("CoolEmAllTestbed", "Total_processors_energy_consumption", (itComputingPower), timestamp, "Wh");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "Total_processors_energy_consumption", -1, timestamp, "Wh");
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_processors_energy_consumption - not implemented yet", 0, timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_processors_energy_consumption - not implemented yet", -1, timestamp, "Wh");
 		}
 		return metric;
@@ -87,7 +88,7 @@
 			}
 			double fanPowerConumspion = nodeComputingPower - itComputingPower;
-			metric = new MetricsStats("CoolEmAllTestbed", "Total_IT_energy_consumption", (totalSitePower * CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY - fanPowerConumspion), timestamp, "Wh");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "Total_IT_energy_consumption", -1, timestamp, "Wh");
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_IT_energy_consumption - not implemented yet", 0, timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_IT_energy_consumption - not implemented yet", -1, timestamp, "Wh");
 		}
 		return metric;
@@ -120,7 +121,7 @@
 			double nodeGroupFansPowerConumspion = nodeComputingPower - itComputingPower;
 
-			metric = new MetricsStats("CoolEmAllTestbed", "PUE_Level_4", roomPower/(totalSitePower * CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY - nodeGroupFansPowerConumspion), timestamp, "");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "PUE_Level_4", -1, timestamp, "");
+			metric = new MetricsStats("CoolEmAllTestbed", "PUE_Level_4 - not implemented yet", 0, timestamp, "");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "PUE_Level_4 - not implemented yet", -1, timestamp, "");
 		}
 		return metric;
@@ -143,7 +144,7 @@
 
 
-			metric = new MetricsStats("CoolEmAllTestbed", "PUE", roomPower/totalSitePower, timestamp, "");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "PUE", -1, timestamp, "");
+			metric = new MetricsStats("CoolEmAllTestbed", "PUE - not implemented yet", 0, timestamp, "");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "PUE - not implemented yet", -1, timestamp, "");
 		}
 		return metric;
@@ -162,7 +163,7 @@
 				}
 			}
-			metric = new MetricsStats("CoolEmAllTestbed", "Useful_Work", usefulWork, timestamp, "UW units");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "Useful_Work", -1, timestamp, "UW units");
+			metric = new MetricsStats("CoolEmAllTestbed", "Useful_Work - not implemented yet", 0, timestamp, "UW units");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Useful_Work - not implemented yet", -1, timestamp, "UW units");
 		}
 		
@@ -187,7 +188,7 @@
 			}
 			
-			metric = new MetricsStats("CoolEmAllTestbed", "Productivity", usefulWork/totalSitePower, timestamp, "UW units/Wh");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "Productivity", -1, timestamp, "UW units/Wh");
+			metric = new MetricsStats("CoolEmAllTestbed", "Productivity - not implemented yet", 0, timestamp, "UW units/Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Productivity - not implemented yet", -1, timestamp, "UW units/Wh");
 		}
 		
@@ -207,7 +208,7 @@
 			}
 
-			metric = new MetricsStats("CoolEmAllTestbed", "Max_power", maxPower, timestamp, "W");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "Max_power", -1, timestamp, "W");
+			metric = new MetricsStats("CoolEmAllTestbed", "Max_power - not implemented yet", 0, timestamp, "W");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Max_power - not implemented yet", -1, timestamp, "W");
 		}
 		
@@ -223,7 +224,7 @@
 				coolingDevicePower = coolingDevicePower + acc.getSum();
 			}
-			metric = new MetricsStats("CoolEmAllTestbed", "Total_cooling_device_energy_consumption", coolingDevicePower, timestamp, "Wh");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "Total_cooling_device_energy_consumption", -1, timestamp, "Wh");
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_cooling_device_energy_consumption - not implemented yet", 0, timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_cooling_device_energy_consumption - not implemented yet", -1, timestamp, "Wh");
 		}
 		return metric;
@@ -239,7 +240,7 @@
 				roomPower = roomPower + acc.getSum();
 			}
-			metric = new MetricsStats("CoolEmAllTestbed", "Mean_power", roomPower/((this.endTime - this.startTime)/(SEC_IN_HOUR * MILLI_SEC)), timestamp, "W");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "Mean_power", -1, timestamp, "W");
+			metric = new MetricsStats("CoolEmAllTestbed", "Mean_power - not implemented yet", 0, timestamp, "W");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Mean_power - not implemented yet", -1, timestamp, "W");
 		}
 		return metric;
@@ -256,7 +257,7 @@
 			double itEnergy = calculateITEnergyConsumption().getValue();
 			
-			metric = new MetricsStats("CoolEmAllTestbed", "Energy_waste_rate", (1 - itComputingEnergy/itEnergy) * 100, timestamp, "%");
-		} catch (Exception e){
-			metric = new MetricsStats("CoolEmAllTestbed", "Energy_waste_rate", -1, timestamp, "%");
+			metric = new MetricsStats("CoolEmAllTestbed", "Energy_waste_rate - not implemented yet", 0, timestamp, "%");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Energy_waste_rate - not implemented yet", -1, timestamp, "%");
 		}
 		return metric;
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/local/ResourceAllocation.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/local/ResourceAllocation.java	(revision 517)
+++ 	(revision )
@@ -1,27 +1,0 @@
-package schedframe.scheduling.plugin.local;
-
-import java.util.Map;
-
-import schedframe.resources.units.ResourceUnit;
-import schedframe.resources.units.ResourceUnitName;
-
-public interface ResourceAllocation {
-	
-	/**
-	 * Allocates resource units( marks as used) on the basis of given resource
-	 * units.
-	 * 
-	 * @param freeRes
-	 *            resource units to be consumed
-	 */
-	public boolean allocateResources(Map<ResourceUnitName, ResourceUnit> freeRes);
-
-	/**
-	 * Frees given resource units.
-	 * 
-	 * @param lastUsedResources
-	 *            resource units to be free
-	 */
-	public void freeResources(Map<ResourceUnitName, ResourceUnit> lastUsedResources);
-	
-}
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java	(revision 1362)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java	(revision 1377)
@@ -26,5 +26,5 @@
 import schedframe.scheduling.plugin.estimation.ExecutionTimeEstimationPlugin;
 import schedframe.scheduling.plugin.grid.ModuleList;
-import schedframe.scheduling.plugin.local.ResourceAllocation;
+import schedframe.scheduling.manager.resources.ResourceAllocation;
 import schedframe.scheduling.queue.TaskQueue;
 import schedframe.scheduling.queue.TaskQueueList;
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java	(revision 1374)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java	(revision 1377)
@@ -238,5 +238,5 @@
 				Executable exec = (Executable) execTask;
 				Map<ResourceUnitName, ResourceUnit> lastUsed = exec.getAllocatedResources().getLast().getResourceUnits();
-				getAllocationManager().freeResources(lastUsed);
+				getAllocationManager().freeResources(lastUsed, true);
 				
 				saveExecutionHistory(exec, exec.getCompletionPercentage(), exec.getEstimatedDuration());
@@ -262,5 +262,5 @@
 				Executable exec = (Executable) execTask;
 
-				boolean status = allocateResources(exec, resources);
+				boolean status = allocateResources(exec, resources, true);
 				if(status == false){
 					TaskList newTasks = new TaskListImpl();
@@ -332,5 +332,5 @@
 
 		Executable exec = (Executable)task;
-		boolean allocationStatus = allocateResources(exec, choosenResources);
+		boolean allocationStatus = allocateResources(exec, choosenResources, false);
 		if(allocationStatus == false){
 			log.info("Task " + task.getJobId() + "_" + task.getId() + " requires more resources than is available at this moment.");
@@ -417,5 +417,5 @@
 
 		Map<ResourceUnitName, ResourceUnit> lastUsed = exec.getAllocatedResources().getLast().getResourceUnits();
-		getAllocationManager().freeResources(lastUsed);
+		getAllocationManager().freeResources(lastUsed, true);
 		
 		//TODO calculate the value of completion
@@ -727,6 +727,6 @@
 	}
 	
-	public boolean allocateResources(Executable exec, Map<ResourceUnitName, ResourceUnit> choosenResources){
-		boolean allocationStatus = getAllocationManager().allocateResources(choosenResources);
+	public boolean allocateResources(Executable exec, Map<ResourceUnitName, ResourceUnit> choosenResources, boolean exclusive){
+		boolean allocationStatus = getAllocationManager().allocateResources(choosenResources, exclusive);
 		if(allocationStatus){
 			ResourceHistoryItem resourceHistoryItem = new ResourceHistoryItem(choosenResources);
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/LocalResourceManager.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/LocalResourceManager.java	(revision 1374)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/LocalResourceManager.java	(revision 1377)
@@ -29,5 +29,4 @@
 import schedframe.resources.units.StandardResourceUnitName;
 import schedframe.scheduling.Scheduler;
-import schedframe.scheduling.plugin.local.ResourceAllocation;
 
 
@@ -297,5 +296,6 @@
 	}
 	
-	public boolean allocateResources(Map<ResourceUnitName, ResourceUnit> resources) {
+
+	public boolean allocateResources(Map<ResourceUnitName, ResourceUnit> resources, boolean exclusive) {
 		
 		if (resources == null) {
@@ -303,13 +303,29 @@
 		}
 		
-		for(ResourceUnitName resUnitName: resources.keySet()){
-			ResourceUnit resUnit = resources.get(resUnitName);
-			resUnit.getProvisioner().setState(ResourceUnitState.BUSY);
-		}
-		return true;
-	}
-
-
-	public void freeResources(Map<ResourceUnitName, ResourceUnit> resources) {
+		if(exclusive){
+			for(ResourceUnitName resUnitName: resources.keySet()){
+				ResourceUnit resUnit = resources.get(resUnitName);
+				if(resUnit.getName().getName().equals(StandardResourceUnitName.PE.getName())){
+					ProcessingElements pe = (ProcessingElements)resUnit;
+					for(ComputingResource cr: pe){
+						if(cr.getStatus().equals(ResourceStatus.BUSY)){
+							return false;
+						}
+					}
+				}
+				resUnit.getProvisioner().setState(ResourceUnitState.BUSY);
+			}
+			
+			return true;
+		} else {
+			for(ResourceUnitName resUnitName: resources.keySet()){
+				ResourceUnit resUnit = resources.get(resUnitName);
+				resUnit.getProvisioner().setState(ResourceUnitState.BUSY);
+			}
+			return true;	
+		}
+	}
+
+	public void freeResources(Map<ResourceUnitName, ResourceUnit> resources, boolean exclusive) {
 		
 		for(ResourceUnitName resUnitName: resources.keySet()){
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/ResourceAllocation.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/ResourceAllocation.java	(revision 477)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/ResourceAllocation.java	(revision 1377)
@@ -1,13 +1,32 @@
 package schedframe.scheduling.manager.resources;
 
-import java.util.List;
+import java.util.Map;
 
-import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.units.ResourceUnit;
+import schedframe.resources.units.ResourceUnitName;
 
 public interface ResourceAllocation {
-	public void allocateResources(List<ComputingResource> resources);
+	
+	/**
+	 * Allocates resource units( marks as used) on the basis of given resource
+	 * units.
+	 * 
+	 * @param freeRes
+	 *            resource units to be consumed
+	 * @param exclusive
+	 *           allocate resources in exclusive mode
+	 */
+	public boolean allocateResources(Map<ResourceUnitName, ResourceUnit> freeRes, boolean exclusive);
 
+	/**
+	 * Frees given resource units.
+	 * 
+	 * @param lastUsedResources
+	 *            resource units to be free
+	 * @param exclusive
+	 *            free resources allocated in exclusive mode
+	 */
+	public void freeResources(Map<ResourceUnitName, ResourceUnit> lastUsedResources, boolean exclusive);
 
-	public void freeResources(List<ComputingResource> resources);
 	
 }
