hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel
Class MaxMinProvider

java.lang.Object
  extended by hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.ResourceSpreader
      extended by hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.MaxMinFairSpreader
          extended by hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.MaxMinProvider
Direct Known Subclasses:
PhysicalMachine

public class MaxMinProvider
extends MaxMinFairSpreader

This class is part of the unified resource consumption model of DISSECT-CF. This class offers provider (e.g., the source of the resource extraction) specific behavior for the MaxMinFairness resource spreading technique. This is a generic provider. The implementation does not assume any particular use (e.g. network/cpu). It can even be used to model usual resource bottlenecks in computing environments (e.g. memory bandwidth, GPU).

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

Nested Class Summary
 
Nested classes/interfaces inherited from class hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.ResourceSpreader
ResourceSpreader.FreqSyncer
 
Field Summary
 
Fields inherited from class hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.ResourceSpreader
hashCounter, lastNotifTime, negligableProcessing, perTickProcessingPower, toBeAdded, toBeRemoved, underProcessing, underProcessingLen
 
Constructor Summary
MaxMinProvider(double initialProcessing)
          Constructs a generic Max Min fairness based resource producer.
 
Method Summary
protected  ResourceSpreader getCounterPart(ResourceConsumption con)
          Determines what is the consumer this provider is connected with via the resource consumption specified.
protected  ResourceSpreader getSamePart(ResourceConsumption con)
          Determines what is the provider referred by the resource consumption specified.
protected  boolean isConsumer()
          Tells the world that this particular resource spreader is a provider.
protected  double processSingleConsumption(ResourceConsumption con, long ticksPassed)
          Uses the resource consumption's provider related processing operation to actually offer the resources to those who are in need of them (e.g.
 String toString()
          provides some textual representation of this provider, good for debugging and tracing
protected  void updateConsumptionLimit(ResourceConsumption con, double limit)
          Translates the consumption limit update request to actually changing a field in the resource consumption that is related to providers.
 
Methods inherited from class hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.MaxMinFairSpreader
singleGroupwiseFreqUpdater
 
Methods inherited from class hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.ResourceSpreader
cancelConsumption, getCurrentPowerBehavior, getHashandIncCounter, getPerTickProcessingPower, getSyncer, getTotalProcessed, hashCode, isAcceptableConsumption, registerConsumption, removeTheseConsumptions, setCurrentPowerBehavior, setPerTickProcessingPower, subscribePowerBehaviorChangeEvents, unsubscribePowerBehaviorChangeEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MaxMinProvider

public MaxMinProvider(double initialProcessing)
Constructs a generic Max Min fairness based resource producer.

Parameters:
initialProcessing - determines the amount of resources this producer could offer in a single tick
Method Detail

updateConsumptionLimit

protected void updateConsumptionLimit(ResourceConsumption con,
                                      double limit)
Translates the consumption limit update request to actually changing a field in the resource consumption that is related to providers. The limit set here is expected to reflect the processing this provider could offer in the particular time instance with regards to the particular resource consumption.

Specified by:
updateConsumptionLimit in class MaxMinFairSpreader
Parameters:
con - the resource consumption object to be updated with the limit value
limit - the limit value to be propagated to the resource consumption object's relevant (i.e. provider/consumer specific) field

processSingleConsumption

protected double processSingleConsumption(ResourceConsumption con,
                                          long ticksPassed)
Uses the resource consumption's provider related processing operation to actually offer the resources to those who are in need of them (e.g. in case of a network transfer this means the provider actually pushes the data to the network. In case of a virtual machine this could mean that the physical CPU of offers some computational resources for the VM to actually execute some instructions)

Specified by:
processSingleConsumption in class ResourceSpreader
Parameters:
con - the resource consumption to be realigned
ticksPassed - the time passed since the last processing request
Returns:
Its absolute value represents the amount of actually processed resources. If negative then the 'con' has completed its processing.

getCounterPart

protected ResourceSpreader getCounterPart(ResourceConsumption con)
Determines what is the consumer this provider is connected with via the resource consumption specified.

Specified by:
getCounterPart in class ResourceSpreader
Parameters:
con - The consumption object for which we would like to know the other party that participates in the processing with us.
Returns:
the other resource spreader that does the processing with us

getSamePart

protected ResourceSpreader getSamePart(ResourceConsumption con)
Determines what is the provider referred by the resource consumption specified.

Specified by:
getSamePart in class ResourceSpreader
Parameters:
con - The consumption object on which this call will operate
Returns:
the resource spreader set to be in the same role (provider/consumer) as this resource spreader object (i.e., the spreader on which the function was calleD)

isConsumer

protected boolean isConsumer()
Tells the world that this particular resource spreader is a provider.

Specified by:
isConsumer in class ResourceSpreader
Returns:
true if this resource spreader is a consumer, false otherwise

toString

public String toString()
provides some textual representation of this provider, good for debugging and tracing

Overrides:
toString in class ResourceSpreader


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