|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectThread
Sim_entity
FnbSCFQScheduler
RED
public class RED
This class implements the Random Early Detection (RED) policy for the management of netwrk buffers at routers. Its basic functionality is as follows:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
RED(String name,
double baudRate,
int max_buf_size,
double min_th,
double max_th,
double max_p,
double queue_weight,
boolean storeStats)
Creates a new SCFQ packet scheduler with the specified name and baud rate (in bits/sec). |
|
| Method Summary | |
|---|---|
double |
avgQueueSize()
Calculate the avg queue size for the RED algorithm. |
Packet |
deque()
The method deque() has to decide which queue is to be served next. |
boolean |
enque(Packet pnp)
Checks queue size and puts a packet into the queue |
double |
getAvg()
Returns the AVG |
double |
getMaxP()
Returns the MAX_P |
double |
getMaxTh()
Returns the MAX_TH |
double |
getMinTh()
Returns the MIN_TH |
protected void |
initialize()
This function initializes the parameters of the buffers policies (RED, ARED) |
boolean |
setBaudRate(double rate)
Sets the baud rate that this scheduler will be sending packets at. |
void |
setMaxP(double m)
Updates the value of MAX_P |
void |
setMaxTh(double m)
Updates the value of MAX_TH |
void |
setMinTh(double m)
Updates the value of MIN_TH |
void |
setQueueWeight(double q)
Updates the value of QUEUE_WEIGHT |
void |
updateStats()
Update the statistics of this scheduler to a file. |
| Methods inherited from class Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RED(String name,
double baudRate,
int max_buf_size,
double min_th,
double max_th,
double max_p,
double queue_weight,
boolean storeStats)
throws Exception
name - Name of this schedulerbaudRate - baud rate in bits/s of the port that is using
this scheduler.max_buf_size - maximum buffer size for routersmin_th - minimum threshold for REDmax_th - maximum threshold for REDmax_p - maximum drop probability for REDqueue_weight - queue weight for REDstoreStats - whether we want to store stats or not
Exception - This happens when the name is null or
the baud rate <= 0| Method Detail |
|---|
public boolean enque(Packet pnp)
enque in interface PacketSchedulerenque in class FnbSCFQSchedulerpnp - A Packet to be enqued by this scheduler.
public double avgQueueSize()
protected void initialize()
initialize in class FnbSCFQSchedulerpublic Packet deque()
deque in interface PacketSchedulerdeque in class FnbSCFQSchedulerpublic boolean setBaudRate(double rate)
rate - the baud rate of this scheduler (in bits/s)
public void updateStats()
updateStats in class FnbSCFQSchedulerpublic double getAvg()
getAvg in class FnbSCFQSchedulerpublic double getMaxP()
public void setMaxP(double m)
m - new value for the maximum dropping probabilitypublic double getMinTh()
public double getMaxTh()
public void setQueueWeight(double q)
q - new queue weightpublic void setMinTh(double m)
m - new minimum thresholdpublic void setMaxTh(double m)
m - new maximum threshold
|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||