class SimpleSlot extends Slot {

	@Override
	public void releaseSlot() {

		if (!isCanceled()) {

			// kill all tasks currently running in this slot
			Execution exec = this.executedTask;
			if (exec != null && !exec.isFinished()) {
				exec.fail(new Exception(
						"The slot in which the task was executed has been released. Probably loss of TaskManager "
								+ getInstance()));
			}

			// release directly (if we are directly allocated),
			// otherwise release through the parent shared slot
			if (getParent() == null) {
				// we have to give back the slot to the owning instance
				if (markCancelled()) {
					getInstance().returnAllocatedSlot(this);
				}
			} else {
				// we have to ask our parent to dispose us
				getParent().releaseChild(this);
			}
		}
	}

	public  SimpleSlot(JobID jobID, Instance instance, int slotNumber);
	public  SimpleSlot(JobID jobID, Instance instance, int slotNumber, SharedSlot parent, AbstractID groupID);

}