seda.sandStorm.internal
Class ResponseTimeControllerPID

java.lang.Object
  extended by seda.sandStorm.internal.ResponseTimeController
      extended by seda.sandStorm.internal.ResponseTimeControllerPID
All Implemented Interfaces:
ResponseTimeControllerIF

public class ResponseTimeControllerPID
extends ResponseTimeController

An implementation of ResponseTimeController that uses a PID control.


Field Summary
private  long adjtime
           
private static boolean ADJUST_RATE
           
private static boolean ADJUST_THRESHOLD
           
private static boolean BE_CREATIVE
           
private  int cur_error
           
private  int cur_measurement
           
private  double curRate
           
private  int curThreshold
           
private static boolean DEBUG
           
private static double DERIV_GAIN
           
private  boolean enabled
           
private  double[] errors
           
private static int INIT_DEPTH
           
private static double INIT_RATE
           
protected static int INIT_THRESHOLD
           
private static double INTR_GAIN
           
private  double lambda
           
private  double lasterr
           
private  double lastinterr
           
private static double MAX_RATE
           
protected static int MAX_THRESHOLD
           
private static int MEASUREMENT_SIZE
           
private static long MEASUREMENT_TIME
           
private  long[] measurements
           
private static double MIN_RATE
           
protected static int MIN_THRESHOLD
           
private static int NINETIETH
           
private  double ninetiethRT
           
private  long numReceived
           
private static double PROP_GAIN
           
private  SinkProxy sinkProxy
           
private static double SMOOTH_CONST
           
private  long[] sortedmeasurements
           
private  double totalinterr
           
 
Fields inherited from class seda.sandStorm.internal.ResponseTimeController
pred, stage, targetRT
 
Constructor Summary
ResponseTimeControllerPID(ManagerIF mgr, StageWrapperIF stage)
           
 
Method Summary
 void adjustThreshold(QueueElementIF[] fetched, long procTime)
          Invoked by the stage's thread manager to adjust admission control parameters.
 void disable()
          Disable the response time controller.
 void enable()
          Enable the response time controller.
 
Methods inherited from class seda.sandStorm.internal.ResponseTimeController
getTarget, setTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

ADJUST_THRESHOLD

private static final boolean ADJUST_THRESHOLD
See Also:
Constant Field Values

ADJUST_RATE

private static final boolean ADJUST_RATE
See Also:
Constant Field Values

BE_CREATIVE

private static final boolean BE_CREATIVE
See Also:
Constant Field Values

MEASUREMENT_SIZE

private static final int MEASUREMENT_SIZE
See Also:
Constant Field Values

MEASUREMENT_TIME

private static final long MEASUREMENT_TIME
See Also:
Constant Field Values

SMOOTH_CONST

private static final double SMOOTH_CONST
See Also:
Constant Field Values

PROP_GAIN

private static final double PROP_GAIN
See Also:
Constant Field Values

DERIV_GAIN

private static final double DERIV_GAIN
See Also:
Constant Field Values

INTR_GAIN

private static final double INTR_GAIN
See Also:
Constant Field Values

NINETIETH

private static final int NINETIETH
See Also:
Constant Field Values

INIT_THRESHOLD

protected static final int INIT_THRESHOLD
See Also:
Constant Field Values

MIN_THRESHOLD

protected static final int MIN_THRESHOLD
See Also:
Constant Field Values

MAX_THRESHOLD

protected static final int MAX_THRESHOLD
See Also:
Constant Field Values

INIT_RATE

private static final double INIT_RATE
See Also:
Constant Field Values

INIT_DEPTH

private static final int INIT_DEPTH
See Also:
Constant Field Values

MAX_RATE

private static final double MAX_RATE
See Also:
Constant Field Values

MIN_RATE

private static final double MIN_RATE
See Also:
Constant Field Values

sinkProxy

private SinkProxy sinkProxy

measurements

private long[] measurements

sortedmeasurements

private long[] sortedmeasurements

errors

private double[] errors

lasterr

private double lasterr

lastinterr

private double lastinterr

totalinterr

private double totalinterr

curThreshold

private int curThreshold

cur_measurement

private int cur_measurement

cur_error

private int cur_error

numReceived

private long numReceived

curRate

private double curRate

ninetiethRT

private double ninetiethRT

lambda

private double lambda

adjtime

private long adjtime

enabled

private boolean enabled
Constructor Detail

ResponseTimeControllerPID

public ResponseTimeControllerPID(ManagerIF mgr,
                                 StageWrapperIF stage)
                          throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

enable

public void enable()
Description copied from interface: ResponseTimeControllerIF
Enable the response time controller.

Specified by:
enable in interface ResponseTimeControllerIF
Specified by:
enable in class ResponseTimeController

disable

public void disable()
Description copied from interface: ResponseTimeControllerIF
Disable the response time controller.

Specified by:
disable in interface ResponseTimeControllerIF
Specified by:
disable in class ResponseTimeController

adjustThreshold

public void adjustThreshold(QueueElementIF[] fetched,
                            long procTime)
Description copied from interface: ResponseTimeControllerIF
Invoked by the stage's thread manager to adjust admission control parameters.

Specified by:
adjustThreshold in interface ResponseTimeControllerIF
Specified by:
adjustThreshold in class ResponseTimeController