美文网首页
讲解:EEE413、Python、Python、Bucket F

讲解:EEE413、Python、Python、Bucket F

作者: duanquju | 来源:发表于2020-03-02 14:37 被阅读0次

    EEE413 DATA COMMUNICATION AND COMMUNICATIONS NETWORKS - COURSEWORK 2 1Coursework 2: Traffic Shaping with Token Bucket FilterKyeong Soo (Joseph) KimDepartment of Electrical and Electronic EngineeringXi’an Jiaotong-Liverpool University23/11/2018I. INTRODUCTIONIn this assignment, you are to carry out a series of simulations for a token bucket filter (TBF) trafficshaper based on token and leaky buckets with a periodic on-off traffic.II. TOKEN BUCKET FILTER AND ON-OFF TRAFFICHere we discuss a TBF traffic shaper — the combined leaky bucket and token bucket discussed duringthe lectures — and its design for allowing the periodic on-off traffic shown in Fig. 1 to pass through itwithout shaping.Fig. 1. A periodic on-off traffic pattern.Below are the TBF parameters: Token generation rate: ρ MB/s. Token bucket capacity: C MB (full when the first burst arrives). Peak output rate: 10 MB/s (same as the input rate).The TBF design is done in the following three steps using a fluid model1:1) First, we find the minimum value of the token bucket capacity C — in terms of ρ — for the firstburst to pass through the TBF without shaping.Because the maximum burst length S in second is given byS =C10 ρ,the condition for C that allows the first burst with the duration of 0.001 s (i.e., 1 ms) to pass throughis0.001 ≤ S =C10 ρ0.01 0.001ρ ≤ C.1In a fluid model, traffic arrivals are assumed to be continuous like liquid flows rather than discrete (e.g., packets and frames).EEE413 DATA COMMUNICATION AND COMMUNICATIONS NETWORKS - COURSEWORK 2 2Therefore the minimum token bucket capacity is (0.01?0.001ρ) MB.2) Second, given the minimum value of C from 1), we find the minimum (numerical) token generationrate ρ for the second burst (and therefore all bursts) to pass through the TBF without shaping.With the minimum value of C from 1), the token bucket becomes empty at the end of the firstburst. For the second burst to pass through it, therefore, the token bucket should be full again by thebeginning of the second burst. This means that the amount tokens generated during the off period(i.e., 1 ms=0.001 s) should be equal to or greater than the token bucket capacity, i.e.0.001ρ ≥ 0.01 0.001ρρ ≥0.010.002= 5.Therefore the minimum token generation rate is 5 MB s?1.3) Finally, from the results of 1) and 2), we obtain the minimum token bucket capacity of 5 EEE413作业代写、代做Python程序作业、代写Python编程作业、代做Bucket Filter作业 调试MatkB(= (0.01 ? 0.001×5) MB).III. TASK: SIMULATION OF A TBF-BASED TRAFFIC SHAPER WITH ON-OFF TRAFFIC1) (10 points) Based on the sample code for the object-oriented implementation of M/M/1 queueingsystem, you are to implement a TBF traffic shaper and a packet generator for the periodic on-offtraffic shown in Fig. 1.We assume the following for simulations: There is no propagation delay. Transmission rates are set to 10 MB s?1for both packet generator and TBF. The packet generator generates 1000-B packets back to back during the on period (i.e., no gapbetween packets). In the simulations, arrivals are discrete (i.e., not using the fluid model): When a packet arrivesat the TBF,– If the amount of tokens in the token bucket is equal to or greater than the packet size, it canpass the TBF immediately.– Otherwise, the packet should wait until there are enough tokens generated. TBF parameter values are set to those given by the analysis based on the fluid model in Sec. I.During the simulation, the delay of each packet should be displayed on the screen and also recordedat the packet sink; the average delay is calculated at the end of the simulation.2) (5 points) If the average packet delay from the simulation in 1) is two times of the packet transmissiontime (i.e., 0.2 ms=2×(1000 B/10 MB s?1)×(1000 ms/1 s)), we can conclude that there has been notraffic shaping at the TBF; otherwise, it must be that some packets have been delayed at the TBFdue to traffic shaping.Answer the following based on your simulation results from 1): What is your conclusion (i.e., the on-off traffic passing through the TBF with or withoutshaping)? If packets are shaped at the TBF, explain why. Also, find TBF parameters allowing packets topass through the TBF and show that they work (i.e., no shaping) through another simulationwith the newly-designed parameters.IV. DELIVERABLESYou need to submit the following through the ICE by 9 am, Monday, 24/12/2018.EEE413 DATA COMMUNICATION AND COMMUNICATIONS NETWORKS - COURSEWORK 2 3 A coursework report. Source code for the simulation programs. Scripts for plotting and post-processing, if any (e.g., Python with matplotlib, gnuplot, and MATLAB).As part of the report, you must provide detailed instructions how to run the simulations so that TAcan reproduce your results on his computer (as in the slide #64 of “Network Simulation Based onPython/SimPy”).转自:http://ass.3daixie.com/2018122139915024.html

    相关文章

      网友评论

          本文标题:讲解:EEE413、Python、Python、Bucket F

          本文链接:https://www.haomeiwen.com/subject/iizmkhtx.html