cherrielee18 发表于 2008-5-6 07:42

高酬matlab编程救助(能做的高手请与我联系QQ 346719984)

在network 中 如何用token bucket to control packet transmission rate.<br/>编程序后做图表分析<br/>能做的高手请与我联系QQ 346719984<br/><br/>内容如下<br/>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>The risk of congestion collapse on the Internet is becoming a reality
given the increasing number<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>of audio/video applications that use UDP as their main transport
protocol. Unlike TCP, these<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>traffic do not respond to congestion signal; i.e., a packet loss. As a
result, audio/video<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>applications may take an unfair share of the network bandwidth and
also cause persistent<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>congestion. To avoid congestion collapse, the IETF has proposed that
audio/video applications<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>use equation based congestion control (see Lecture‐7 and the reference
given on the next<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>page).<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>In this assignment, you will simulate </span><i><span style="font-family: &quot;Calibri-Italic&quot;,&quot;sans-serif&quot;;">n
</span></i><span>sources that uses
equation based congestion control to<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>set their transmission rate. From your simulation, you will determine
whether equation based<op></op></span></p>
        <p class="MsoNormal"><span>congestion
control is effective in reducing packet loss, and hence congestion.<op></op></span></p>
        <p class="MsoNormal"><span><!--Element not supported - Type: 8 Name: #comment--><!--Element not supported - Type: 8 Name: #comment--><br/><!--Element not supported - Type: 8 Name: #comment--></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>The above network can then be simulated as follows:<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><u><span>Initialization<op></op></span></u></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>Set the router’s queue size to N, meaning it can hold up to N packets.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>For each sender, set an initial transmission rate, and determine the
time when the first packet is<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>to be generated.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><u><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Body<op></op></span></u></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>FOR t=1 to SIM_TIME DO<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">{<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>1. IF the router’s queue is not empty then dequeue a packet, and
enqueue that packet in<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>the corresponding receiver’s queue.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>2. IF a sender has a packet to send THEN<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>‐ Check if the router’s queue is full. If not, enqueue the sender’s
packet. Otherwise,<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>discard the packet.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>3. Determine whether any packet loss rate messages are generated by
receivers. If yes,<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>then re‐compute the sender’s transmission rate. Determine the new time
when the<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>next packet will be generated. I.e, t+k, where k is the time interval
until the next packet<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>arrives.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>4. Collect all required statistics.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">}<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>In your simulation, collect the (a) queue length over time, (b)
average queue length, (c) average<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>end‐to‐end packet delay, and (d) Jain’s fairness index. Determine the
effect of the following<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>factors: (i) increasing source and receiver pairs, (ii) varying N
values, (iii) different packet loss<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>reporting periods, (iv) loss calculation methods, (v) load p, (vi)
router’s transmission rate;<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>instead of one packet per‐tic, try </span><i><span style="font-family: &quot;Calibri-Italic&quot;,&quot;sans-serif&quot;;">k </span></i><span>packets, and (vii) </span><i><span style="font-family: &quot;Calibri-Italic&quot;,&quot;sans-serif&quot;;">z
</span></i><span>number of new flows
arriving at time </span><i><span style="font-family: &quot;Calibri-Italic&quot;,&quot;sans-serif&quot;;">t </span></i><span>.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><op>
                        </op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span>
                        </span>Do  with sources
using a token/leaky bucket to control their transmission rate.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>Another difference is that each source has an application that
generates bursty traffic, where<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>multiple packets arrive in consecutive time intervals.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>To generate bursty traffic, use the following method:<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><op>
                        </op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>In the diagram above, an application generates a packet when it is in
the ON state. With<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>probability </span><b><span style="font-family: &quot;Calibri-Bold&quot;,&quot;sans-serif&quot;;">k</span></b><span>, it will transition to the OFF state where it will remain idle. In
this state, it has<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>probability </span><b><span style="font-family: &quot;Calibri-Bold&quot;,&quot;sans-serif&quot;;">z </span></b><span>of moving back to the ON state.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>The pseudo‐code is as follows:<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>1. Start at a random state: ON/OFF.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>2. At every simulation tic, do<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>a. Select a random number R in 0&lt;= R &lt;=1.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>b. If in </span><b><i><span style="font-family: &quot;Calibri-BoldItalic&quot;,&quot;sans-serif&quot;;">state=O</span></i></b><i><span style="font-family: &quot;Calibri-Italic&quot;,&quot;sans-serif&quot;;">N
</span></i><span>AND R&gt;=k, set </span><b><i><span style="font-family: &quot;Calibri-BoldItalic&quot;,&quot;sans-serif&quot;;">state=OFF</span></i></b><span>.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>c. If in </span><b><i><span style="font-family: &quot;Calibri-BoldItalic&quot;,&quot;sans-serif&quot;;">state=OFF </span></i></b><span>AND R&gt;z, set </span><b><i><span style="font-family: &quot;Calibri-BoldItalic&quot;,&quot;sans-serif&quot;;">state=ON</span></i></b><span>.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>d. If </span><b><i><span style="font-family: &quot;Calibri-BoldItalic&quot;,&quot;sans-serif&quot;;">state </span></i></b><span>equals ON, generate a packet.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>Design an algorithm to control the token/leaky‐bucket rate of each
source (or all sources<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>simultaneously) such that congestion does not happen. Note, you must
experiment with<op></op></span></p>
        <p class="MsoNormal"><span>different </span><b><i><span style="font-family: &quot;Calibri-BoldItalic&quot;,&quot;sans-serif&quot;;">k
</span></i></b><span>and </span><b><i><span style="font-family: &quot;Calibri-BoldItalic&quot;,&quot;sans-serif&quot;;">z
</span></i></b><span>values and determine
their impact on congestion.<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Reference<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">S. Floyd, M. Handley, J. Padhye,
and J. Widmer (2000) Equation-based Congestion Control for Unicast<op></op></span></p>
        <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Applications, ACM SIGCOMM, May,
2000.<op></op></span></p>
        <p class="MsoNormal"><op>
                </op></p>
        <br/><br/><br/><br/><br/><br/><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><op></op></span></p>
页: [1]
查看完整版本: 高酬matlab编程救助(能做的高手请与我联系QQ 346719984)