|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.comp.queue.ActiveQueue
drcl.inet.core.Queue
drcl.intserv.Scheduler
The information unit a scheduler deals with in our architecture is "flow".
A flow is defined as the aggregate traffic of individual traffics originated
from a set of sources in the same (multicast) group.
Different scheduling algorithms have their own parameters to
describe the resource requirement for a flow.
The set of parameters is called an "Rspec".
Packets are classified to three types: QoS_DATA, CONTROL and BEST_EFFORTS_DATA.
By default, QoS_DATA has the highest priority and BEST_EFFORTS has the lowest.
That is, when NetworkInterface is ready to transmit a packet, the scheduler
looks for available packets from QoS queue(s) first, and the queue of control
packets if no QoS packet is available, and then best-efforts packets.
However, one can install a special QoS flow for control packets with source and
destination set to null address, and/or for best-efforts packets with source set
to any address (and destination set to null address) in order to provide
hard-guaranteed QoS (lower priority packets may degrade the QoS of QoS flows
because packet transmission is not preemptible).
Scheduler Configuration Contract: Component (e.g. PacketFilter Manager) - Scheduler.
Queue
are treated as config ports; they follow Scheduler Configuration Contract.
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
static int |
AVAILABLE_ACTUAL_QoS
|
static int |
AVAILABLE_ALLOCATED_QoS
|
static int |
AVAILABLE_BE
|
static java.lang.String |
BUFFER_CHANGE_EVENT_NAME
Name of the (reserved) buffer change event. |
static java.lang.String |
BUFFER_CHANGE_EVENT_PORT
Name of the (reserved) buffer change event port. |
protected double |
bufferRatio
|
static java.lang.String |
BW_CHANGE_EVENT_NAME
Name of the (reserved) bandwidth change event. |
static java.lang.String |
BW_CHANGE_EVENT_PORT
Name of the (reserved) bandwidth change event port. |
protected double |
bwRatio
|
protected int |
maxBuffer
|
protected int |
maxBW
|
int |
mtu
|
protected int |
nonqosAlloc
|
double |
pktLossRate
|
protected int |
qosAlloc
|
protected int |
qosBuffer
|
protected int |
qosBW
|
protected int |
qosResvBuffer
|
protected int |
qosResvBW
|
| Fields inherited from class drcl.comp.queue.ActiveQueue |
nrequests, outport, OUTPUT_PORT_ID |
| Fields inherited from interface drcl.inet.core.InetCoreConstants |
CONFIG_PORT_ID, PULL_PORT_ID |
| Constructor Summary | |
Scheduler()
|
|
Scheduler(java.lang.String id_)
|
|
| Method Summary | |
int |
addFlowspec(long[] tos_,
long[] tosmask_,
SpecFlow fspec_)
Adds a flowspec. |
int |
addFlowspec(long tos_,
long tosmask_,
SpecFlow fspec_)
Adds a flowspec. |
int |
addFlowspec(long tos_,
SpecFlow fspec_)
Adds a flowspec. |
void |
addShaper(int handle_,
long[] tos_,
long[] tosmask_,
TrafficShaper shaper_)
Adds a shaper in front of this to complete the reservation. |
boolean |
allocateBuffer(int amount_,
int type_)
|
void |
configure(int bw_,
double bwRatio_,
int buffer_,
double bufferRatio_)
Configures the resources (bandwidth and buffer) governed by this scheduler. |
java.lang.Object |
dequeue()
Dequeues and returns the first object in the queue. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
java.lang.Object |
enqueue(java.lang.Object o_)
Enqueues the object at the end of the queue |
void |
freeBuffer(int amount_,
int type_)
Frees buffer from a departing packet. |
Admission |
getAdmission()
|
SpecFlow[] |
getAllFlowspecs()
Returns the all reservations installed in this link. |
SpecR[] |
getAllRspecs()
Returns all the Rspecs installed. |
int |
getAvailableBuffer()
Returns the remaining buffer for packet allocation. |
int |
getAvailableBW()
Acquires available bandwidth. |
int |
getAvailableCapacity()
Returns the buffer size available for reservation. |
int |
getAvailableQoSBuffer()
Returns the remaining buffer for QoS flow reservation. |
double |
getBufferRatio()
Returns the buffer ratio (%QoS portion). |
int |
getBW()
Returns the bandwidth of the interface. |
double |
getBWRatio()
|
int |
getCapacity()
Returns the capacity of the queue. |
int |
getCurrentLoad()
|
double |
getCurrentLoadByPercentage()
|
SpecFlow |
getFlowspec(int handle_)
Returns the reservation specified by the handle. |
SpecFlow |
getFlowspec(long tos_)
Returns the the flow that best matches the ToS value. |
int |
getMTU()
|
java.lang.Object |
getObject()
Returns the admission object wrapped in this scheduler component. |
double |
getPktLossRate()
|
double |
getPropDelay()
|
SpecR |
getRspec(int handle_)
Returns the flow specified by the handle. |
SpecR |
getRspec(long tos_)
Returns the rspec of the flow that best matches the ToS value. |
int |
getSize()
Returns the current size of the queue. |
long |
getToSMask()
|
java.lang.String |
info()
Returns information regarding this component. |
boolean |
isDegradedQoSEnabled()
|
boolean |
isEmpty()
Return true if the queue is empty. |
boolean |
isFull()
Return true if the queue is full. |
protected void |
process(java.lang.Object data_,
Port inPort_)
The main callback method of a component. |
protected abstract Packet |
qosDeque()
Subclasses must override this method to provide its own dequeuing scheme. |
protected abstract void |
qosEnque(Packet p_,
SpecR rspec_)
Subclasses must override this method to provide its own enqueuing scheme. |
void |
releaseBW(int amount_)
Releases bandwidth allocation (from a certain flow). |
void |
releaseQoSBuffer(int amount_)
Frees buffer from a QoS flow. |
void |
removeAllFlowspecs()
|
SpecFlow |
removeFlowspec(int handle_)
Removes a flowspec. |
void |
removeShaper(int handle_)
Removes the shaper in a reservation. |
void |
reset()
Resets the component for being used anew. |
boolean |
resvBW(int amount_)
Allocates bandwidth (for a certain flow). |
java.lang.String |
resvinfo()
Displays the reservations installed in this scheduler. |
boolean |
resvQoSBuffer(int amount_)
Allocates buffer for a QoS flow. |
void |
setAdmission(Admission adm_)
|
void |
setBufferRatio(double ratio_)
Sets the buffer ratio (%QoS portion). |
void |
setBW(int cap_)
Sets the bandwidth of the interface. |
void |
setBWRatio(double ratio_)
|
void |
setCapacity(int size_)
Sets the capacity (in bytes) of the queue. |
void |
setDegradedQoSEnabled(boolean dqos_)
Enables/disables graceful QoS degradation. |
int |
setFlowspec(int handle_,
long[] tos_,
long[] tosmask_,
SpecFlow fspec_)
Adds/modifies the flowspec with the specified handle. |
void |
setMTU(int mtu_)
|
void |
setPktLossRate(double v_)
|
void |
setToSMask(long mask_)
Sets the ToS mask. |
| Methods inherited from class drcl.inet.core.Queue |
createConfigPort, getMode, info, isByteMode, isPacketMode, setMode |
| Methods inherited from class drcl.comp.queue.ActiveQueue |
_getnrequests, _setnrequests, enqueueAt, firstElement, getAvailableSize, getEnqueCount, increaseEnqueCount, lastElement, peekAt, pull, retrieveAt |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String BW_CHANGE_EVENT_PORT
public static final java.lang.String BUFFER_CHANGE_EVENT_PORT
public static final java.lang.String BW_CHANGE_EVENT_NAME
public static final java.lang.String BUFFER_CHANGE_EVENT_NAME
public int mtu
public double pktLossRate
protected int maxBW
protected double bwRatio
protected int qosBW
protected transient int qosResvBW
protected int maxBuffer
protected double bufferRatio
protected int qosBuffer
protected transient int qosResvBuffer
protected transient int qosAlloc
protected transient int nonqosAlloc
public static final int AVAILABLE_ALLOCATED_QoS
public static final int AVAILABLE_ACTUAL_QoS
public static final int AVAILABLE_BE
| Constructor Detail |
public Scheduler()
public Scheduler(java.lang.String id_)
| Method Detail |
public void reset()
Component
reset in class Queuepublic void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Queuepublic java.lang.Object getObject()
getObject in interface Wrapperpublic java.lang.Object enqueue(java.lang.Object o_)
ActiveQueue
enqueue in class ActiveQueuepublic java.lang.Object dequeue()
ActiveQueue
dequeue in class ActiveQueue
protected abstract void qosEnque(Packet p_,
SpecR rspec_)
protected abstract Packet qosDeque()
protected void process(java.lang.Object data_,
Port inPort_)
Component
process in class ActiveQueuepublic int getAvailableCapacity()
public int getCapacity()
Queue
getCapacity in class Queuepublic void setCapacity(int size_)
Queue
setCapacity in class Queuesize_ - the new capacity.public void setMTU(int mtu_)
public int getMTU()
public void setPktLossRate(double v_)
public double getPktLossRate()
public void setAdmission(Admission adm_)
public Admission getAdmission()
public void setToSMask(long mask_)
public long getToSMask()
public void setDegradedQoSEnabled(boolean dqos_)
public boolean isDegradedQoSEnabled()
public java.lang.String info()
Component
info in class ActiveQueuepublic java.lang.String resvinfo()
public final int addFlowspec(long tos_,
SpecFlow fspec_)
public final int addFlowspec(long tos_,
long tosmask_,
SpecFlow fspec_)
public final int addFlowspec(long[] tos_,
long[] tosmask_,
SpecFlow fspec_)
public int setFlowspec(int handle_,
long[] tos_,
long[] tosmask_,
SpecFlow fspec_)
public SpecFlow removeFlowspec(int handle_)
public final SpecFlow getFlowspec(int handle_)
public final SpecFlow[] getAllFlowspecs()
public final SpecR getRspec(int handle_)
public final SpecR[] getAllRspecs()
public final SpecR getRspec(long tos_)
public final SpecFlow getFlowspec(long tos_)
public void removeAllFlowspecs()
public void addShaper(int handle_,
long[] tos_,
long[] tosmask_,
TrafficShaper shaper_)
handle_ - is the one for the reservation.public void removeShaper(int handle_)
handle_ - is the one for the reservation.public final boolean resvBW(int amount_)
public final void releaseBW(int amount_)
public int getAvailableBW()
public int getBW()
public void setBW(int cap_)
public double getBWRatio()
public void setBWRatio(double ratio_)
public int getCurrentLoad()
public double getCurrentLoadByPercentage()
public boolean allocateBuffer(int amount_,
int type_)
public void freeBuffer(int amount_,
int type_)
public boolean resvQoSBuffer(int amount_)
public void releaseQoSBuffer(int amount_)
public int getAvailableQoSBuffer()
public int getAvailableBuffer()
public double getBufferRatio()
public void setBufferRatio(double ratio_)
public double getPropDelay()
public int getSize()
Queue
getSize in class Queuepublic boolean isEmpty()
ActiveQueue
isEmpty in class ActiveQueuepublic boolean isFull()
ActiveQueue
isFull in class ActiveQueue
public void configure(int bw_,
double bwRatio_,
int buffer_,
double bufferRatio_)
bwRatio_ - the percentage of bandwidth allocated to QoS flows.bufferRatio_ - the percentage of buffer allocated to QoS flows.
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||