code: public SharedSlot allocateSharedSlot(SlotSharingGroupAssignment sharingGroupAssignment)
  			throws InstanceDiedException {
  
  		synchronized (instanceLock) {
  			if (isDead) {
  				throw new InstanceDiedException(this);
  			}
  
  			Integer nextSlot = availableSlots.poll();
  			if (nextSlot == null) {
  				return null;
  			}
  			else {
  				SharedSlot slot = new SharedSlot(
  					this,
  					location,
  					nextSlot,
  					taskManagerGateway,
  					sharingGroupAssignment);
  				allocatedSlots.add(slot);
  				return slot;
  			}
  		}
  	}
docs: Allocates a shared slot on this TaskManager instance. This method returns {@code null}, if no slot
  is available at the moment. The shared slot will be managed by the given  SlotSharingGroupAssignment.
  
  @param sharingGroupAssignment The assignment group that manages this shared slot.
  
  @return A shared slot that represents a task slot on this TaskManager instance and can hold other
  (shared) slots, or null, if the TaskManager instance has no more slots available.
  
  @throws InstanceDiedException Thrown if the instance is no longer alive by the time the slot is allocated.