Question: The first function prob_block is responsible for calculating the number 0.0004 from the slide, but doing so in the following more general situation.For a shared

 The first function prob_block is responsible for calculating the number 0.0004

The first function prob_block is responsible for calculating the number 0.0004 from the slide, but doing so in the following more general situation.For a shared packet switched link, given these parameters: - Run, data rate of the shared link, measured in bits per secend - Ran, data rate of each user when active, measured in bits per secend - octive, fraction of time each user is active - N, number of packet switching users what is the probability that a user will be unable to trarsmit when they attempt to do 90 , which is called the blocking probobility?The function should calculate and return that value. For the scenario quoted above, Rlmi = 1Mb/s,Ram=100kb/s, active is 0.1 (10.6) and N is 35 . For this calculation, assume that all packets are the same length, and all users randomly choose at each moment whether to actively wive the linik. The second task is to calculate the switch capacity given the same link and user information, but now to reverse the situation and ask "given an atceptable blocking probabilty, what is the capacity for packet switching?" In addition, you will also calculate the capacity for circuit seitahinc, but this will not depend on the blocking limit, since there is no blocking in a circuit iwithed network fi.e. the number of users is limited at the start, so the users, once granted acctess to the network, do not have their data restricted any more). The parameters for this calculation are: - Ree, data rate of the shared link, measured in bits per second - Rom, data rate of each user when active, measured in bits per second - active, fraction of time each user is active - Porblock_limit, the maximum arceptable blocking probutity and the function is to retum the results for the circuit switching capucity of users and the packet switching capacity of users as a tuple (Nons, N,asedine switching capacity caiculation should make use of the previously written blocking probability function. Irom actpy,ipeneial inport eonb det prob_block(hlink, luser, aetive, Ni) I returs 0.1 det eapacity (xink, thant, actire, block,Iimit] = reture (5, 15) det main (l) Thin section in only here 10 you can run pour pythen code dirocely tron the coneand line by typiry 1 pytbon3 labi_yourname.py There is nothing to do here. h-1000000 r=100000 active =0.1 N=35 pb= prob_black (R2 t. active. W (activen-14)") prist (f" of the time, the blocking probubility is (pbr.6t)") 1 timit =0.00043 (C,D)= eapueity xh0, an aetine, 0.400431 lactive: 10}1 j print (I"blocking probabiaity linit of (1inith, the capacity is ) print (t" (C) for eircuit switching and (P) tor packet mattehing.") if nasie - t main_+ Correct output anen Given 1ink rate 1000000 and user rate 100000 , waers active 10.04 blocking probability is 0.000424 Given link rate 1000000 and user rate 100000 , wsers active 10,08 blocking probability tinit of 0.00063, the capacity is 10 for circuit guitching and 35 for packet switchibg

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!