|
GridSim v3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectgridsim.net.PacketScheduler
gridsim.net.SCFQScheduler
SCFQScheduler implements a Self Clocked Fair Queueing Scheduler. A SCFQ is a variation of Weighted Fair Queueing (WFQ), which is easier to implement than WFQ because it does not need to compute round numbers at every iteration. For more details refer to S. R. Golestani's INFOCOM '94 paper A self-clocked fair queueing scheme for broadband applications.
A SCFQ scheduler can provide differentiated service to traffic by changing the weights associated with a certain class of traffic. The higher the weight of a class of traffic, the better treatment it receives. In this class, you can set the weights by calling setWeights() with a linear array of weights. Traffic that is class 0 (default), are assigned the first element of the array as its weight.
Constructor Summary | |
SCFQScheduler()
Creates a new packet scheduler with the name "SCFQScheduler". |
|
SCFQScheduler(double baudRate)
Creates a new SCFQ packet scheduler with the specified baud rate (bits/s). |
|
SCFQScheduler(String name)
Creates a new SCFQ packet scheduler with the specified name. |
|
SCFQScheduler(String name,
double baudRate)
Creates a new SCFQ packet scheduler with the specified name and baud rate (in bits/s). |
Method Summary | |
Packet |
deque()
The method deque() has to decide which queue is to be served next. |
boolean |
enque(Packet pnp)
Puts a packet into the queue |
boolean |
isEmpty()
Determines whether the scheduler is currently keeping any packets in its queue(s). |
boolean |
setWeights(double[] weights)
This method allows you to set different weights for different types of traffic. |
int |
size()
Determines the number of packets that are currently enqueued in this scheduler. |
Methods inherited from class gridsim.net.PacketScheduler |
getBaudRate, getName, setBaudRate |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SCFQScheduler(String name, double baudRate) throws ParameterException
name
- Name of this schedulerbaudRate
- baud rate in bits/s of the port that is using
this scheduler.
ParameterException
- This happens when the name is null or
the baud rate <= 0public SCFQScheduler(double baudRate) throws ParameterException
baudRate
- baud rate in bits/s of the port that is using
this scheduler.
ParameterException
- This happens when the baud rate <= 0public SCFQScheduler(String name) throws ParameterException
PacketScheduler.setBaudRate(double)
before being the simulation is started.
name
- Name of this scheduler
ParameterException
- This happens when the name is nullPacketScheduler.setBaudRate(double)
public SCFQScheduler() throws ParameterException
PacketScheduler.setBaudRate(double)
before being the simulation is started.
ParameterException
- This happens when the name is nullPacketScheduler.setBaudRate(double)
Method Detail |
public boolean setWeights(double[] weights)
weights
- a linear array of the weights to be assigned to different
classes of traffic.
public boolean enque(Packet pnp)
enque
in class PacketScheduler
pnp
- A Packet to be enqued by this scheduler.
public Packet deque()
deque
in class PacketScheduler
public boolean isEmpty()
isEmpty
in class PacketScheduler
public int size()
size
in class PacketScheduler
|
GridSim v3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |