12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

We add in void PLMLossMonitor::recv(Packet* pkt, H<strong>and</strong>ler*) a Tcl call to the Agent/LossMonitor/PLMi<strong>ns</strong>tproc log-PP each time a packet is received :void LossMonitor::recv(Packet* pkt, H<strong>and</strong>ler*)...if (expected_ >= 0)...Tcl::i<strong>ns</strong>tance().evalf("%s log-PP", name());<strong>The</strong> Agent/LossMonitor/PLM i<strong>ns</strong>tproc log-PP is empty. In fact, we define the log-PP i<strong>ns</strong>tproc for the classPLMLossTrace. log-PP computes an estim<strong>at</strong>e of the available b<strong>and</strong>width based on a single PP burst (of lengthPP_burst_length in packets). Once log-PP has received the PP_burst_length packets of the burst, it computesthe estim<strong>at</strong>e <strong>and</strong> calls the PLM i<strong>ns</strong>tproc make_estim<strong>at</strong>e with the computed estim<strong>at</strong>e as argument.make_estim<strong>at</strong>e puts the estim<strong>at</strong>e based on a single PP (PP_value) in an array of estim<strong>at</strong>e samples (PP_estim<strong>at</strong>e).If PP_value is lower than the current subscription level (i.e. lower than the throughput achieved according to thecurrent number of layers subscribed), make_estim<strong>at</strong>e calls the PLM i<strong>ns</strong>tproc stability-drop which simplydrops layers until the current subscription level becomes lower than PP_value. make_estim<strong>at</strong>e makes an estim<strong>at</strong>ePP_estim<strong>at</strong>e_value by taking the minimum PP_value received during the last check_estim<strong>at</strong>e period(if there are <strong>at</strong> least PP_estim<strong>at</strong>ion_length single PP estim<strong>at</strong>e received). Once make_estim<strong>at</strong>e has aPP_estim<strong>at</strong>e_value it calls the PLM i<strong>ns</strong>tproc choose_layer which joi<strong>ns</strong> or drops layer(s) according to the currentsubscription level <strong>and</strong> to the PP_estim<strong>at</strong>e_value. For details about the PLM i<strong>ns</strong>tproc make_estim<strong>at</strong>e, refer toits code in ~<strong>ns</strong>/tcl/plm/plm.tcl.37.3.4 Detection of a LossEach time a loss is detected by an i<strong>ns</strong>tance of the class PLMLossMonitor, a call to the Agent/LossMonitor/PLM i<strong>ns</strong>tproclog-loss is triggered. <strong>The</strong> Agent/LossMonitor/PLM i<strong>ns</strong>tproc log-loss is empty. In fact, we define the log-lossi<strong>ns</strong>tproc for the class PLMLossTrace. <strong>The</strong> PLMLossTrace i<strong>ns</strong>tproc log-loss simply calls the PLM i<strong>ns</strong>tproc log-losswhich contai<strong>ns</strong> the PLM machinery in case of loss. In summary, log-loss only drops a layer when the loss r<strong>at</strong>e exceeds10% (this test is executed by the PLM i<strong>ns</strong>tproc exeed_loss_thresh). After a layer drop log-loss precludes any otherlayer drop due to loss for 500ms. For details about the PLM i<strong>ns</strong>tproc log-loss, refer to its code in ~<strong>ns</strong>/tcl/plm/plm.tcl.37.3.5 Joining or Leaving a LayerTo join a layer the PLM i<strong>ns</strong>tproc add-layer is called. This i<strong>ns</strong>tproc calls the PLMLayer i<strong>ns</strong>tproc join-group whichcalls the PLMLayer/<strong>ns</strong> i<strong>ns</strong>tproc join-group. To leave a layer the PLM i<strong>ns</strong>tproc drop-layer is called. This i<strong>ns</strong>tproccalls the PLMLayer i<strong>ns</strong>tproc leave-group which calls the PLMLayer/<strong>ns</strong> i<strong>ns</strong>tproc leave-group.37.4 Comm<strong>and</strong>s <strong>at</strong> a GlanceNote: This section is a copy paste of the end of section 37.1. We add this section to preserve homogeneity with the <strong>ns</strong> manual.328

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!