hu.mta.sztaki.lpds.cloud.simulator.iaas.pmscheduling
Class SchedulingDependentMachines

java.lang.Object
  extended by hu.mta.sztaki.lpds.cloud.simulator.iaas.pmscheduling.PhysicalMachineController
      extended by hu.mta.sztaki.lpds.cloud.simulator.iaas.pmscheduling.SchedulingDependentMachines
Direct Known Subclasses:
MultiPMController

public class SchedulingDependentMachines
extends PhysicalMachineController

A reactive PM controller that increases/decreases the powered on pm set on demands of the vm scheduler. This controller implementation is always changing the machine set size by one, thus it is not applicable in cases when there are rapid demand changes on the infrastructure.

Author:
"Gabor Kecskemeti, Distributed and Parallel Systems Group, University of Innsbruck (c) 2013" "Gabor Kecskemeti, Laboratory of Parallel and Distributed Systems, MTA SZTAKI (c) 2012"

Nested Class Summary
private  class SchedulingDependentMachines.CapacityChangeManager
          The main PM control mechanisms are implemented in this class The class basically controls a single PM.
 
Field Summary
private  HashMap<PhysicalMachine,SchedulingDependentMachines.CapacityChangeManager> capacityManagers
          this map lists all the currently controlled PMs and their controllers.
private  PhysicalMachine currentlyStartingPM
          ensures that we only have a single machine switching on at a time and shows what is the actual machine that is switching on.
 
Fields inherited from class hu.mta.sztaki.lpds.cloud.simulator.iaas.pmscheduling.PhysicalMachineController
parent, queueingEvent
 
Constructor Summary
SchedulingDependentMachines(IaaSService parent)
          Constructs the scheduler and passes the parent IaaSService to the superclass.
 
Method Summary
protected  VMManager.CapacityChangeEvent<PhysicalMachine> getHostRegEvent()
          Defines to do the following when a new host is (de)registered to the parent IaaSService: if the current event is a registration event then the function creates and locally registers a new capacity change manager for the newly registered pms if the current event is a deregistration event then the function cancels the capacity management for all deregistered pms
protected  Scheduler.QueueingEvent getQueueingEvent()
          Defines to do the following when VM requests arrive: check if there is already a PM under preparation (if there is one then does nothing) if there are no PM that is currently prepared then starts to prepare one for accepting VM requests.
protected  void turnOnAMachine()
          switches on a not yet switched on machine from the parent IaaS's PM set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

capacityManagers

private HashMap<PhysicalMachine,SchedulingDependentMachines.CapacityChangeManager> capacityManagers
this map lists all the currently controlled PMs and their controllers.


currentlyStartingPM

private PhysicalMachine currentlyStartingPM
ensures that we only have a single machine switching on at a time and shows what is the actual machine that is switching on.

Constructor Detail

SchedulingDependentMachines

public SchedulingDependentMachines(IaaSService parent)
Constructs the scheduler and passes the parent IaaSService to the superclass.

Parameters:
parent - the IaaSService to serve
Method Detail

getHostRegEvent

protected VMManager.CapacityChangeEvent<PhysicalMachine> getHostRegEvent()
Defines to do the following when a new host is (de)registered to the parent IaaSService:

Specified by:
getHostRegEvent in class PhysicalMachineController
Returns:
the object to handle the registration events

getQueueingEvent

protected Scheduler.QueueingEvent getQueueingEvent()
Defines to do the following when VM requests arrive:
  1. check if there is already a PM under preparation (if there is one then does nothing)
  2. if there are no PM that is currently prepared then starts to prepare one for accepting VM requests.

Specified by:
getQueueingEvent in class PhysicalMachineController
Returns:
the object to handle the VM scheduling related events

turnOnAMachine

protected void turnOnAMachine()
switches on a not yet switched on machine from the parent IaaS's PM set. if there are no more machines in the IaaS that can be turned on then the calling of this function is ignored.



Copyright © 2012–2015 University of Innsbruck & MTA SZTAKI. All rights reserved.