a4_sol

Upload: akttripathi

Post on 04-Jun-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 A4_sol

    1/4

    1

    COSC 3213: Computer NetworksWinter 2005Solutions to Assignment # 4Instructors: Amir Asif and Natalija Vlajic

    Review sections 6.1, 6.2, 6.3, 6.4.1, 6.4.2 before attempting the assignment.

    Question 1: A disadvantage of a broadcast network is the wasted capacity due to multiple hosts attemptingto access the channel at the same time. As a simplistic example, suppose that time is divided into discreteslots, with each of the n hosts attempting to use the channel with probability p during each slot. What fractionof slots are wasted due to collision?

    There are 3 different types of event that may occur.

    Event 1: None of the n machines transmits.Event 2: Exactly 1 of the n machines transmits.

    Event 3: More than 1 machine transmits.

    Assuming that the probability of a single machine transmitting in a time slot is p, then using the Bionomialdistribution the probabilities of Events 1 3 are as follows.

    ( ) ( ) ( ) .1113and1Eventsof iesProbabilit13Eventof yProbabilitand

    .)1()1(12Eventof yProbabilit

    )1()1(01Eventof yProbabilit

    1

    111

    0

    ==

    =

    =

    =

    =

    nn

    nn

    nn

    pnp p

    pnp p pn

    p p pn

    .)1()1(12Eventof yProbabilit111 = =

    nn pnp p pn

    ( ) ( ) ( ) .1113and1Eventsof iesProbabilit13Eventof yProbabilit 1== nn pnp p

    The fraction of the slots wasted due to collisions are given by the probability of Event 3.

    Question 2: Let G = 0.5 [frames/slot] be the total rate at which frames are transmitted in a slotted ALOHAsystem. What proportion of slots will be collision free? What proportion of slots will be collision free whenthe system is operating at its maximum throughput?

    Proportion of slots that will be collision free = P[0 frames arriving in the datalink layer in a slot]

    Assuming Poisson process for the arrival time of the frames,

    P[0 frames arriving in the datalink layer in a slot] = eG = e0.5 ,

    which equals the fraction of slots that will be collision free for G = 0.5.

    The value of G maximum throughput condition in slotted ALOHA is given by G = 1. Based on theaforementioned analysis, we calculate the proportion of collision free slots as

  • 8/13/2019 A4_sol

    2/4

    2

    P[0 frames arriving in the datalink layer in a slot] = eG = e1 = 0.368,

    which equals the fraction of slots that will be collision free for G = 1.

    Question 3: A large population of ALOHA users manages to generate 50 requests/sec, including bothoriginals and retransmissions. Time is slotted in units of 40 msec.(a) What are the chances of success on the first attempt?(b) What is the probability of exactly k collisions and then a success?(c) What is the expected number of transmission attempts needed?

    Slotted ALOHAFrame transmission time ( X ) is given to be 40msec.Total load in requests/s is given to be 50 requests/s implying that

    Total arrival rate G in frames/ X seconds = 50 requests/s X = 50 (40 10 3) = 2 requests/ X seconds.

    (a) Prob of successful tx. on the 1st attempt = P[0 frames arriving in the datalink layer in X seconds)= e X ( X )k / k ! with k = 0= e X or eG

    = 0.1353

    (b) Prob of successful tx. in ( k + 1) attempts = P[collisions in k attempts] P[success in k +1 attempts].

    Based on (a), P[collisions in k attempts] = (1 P[success in the 1 st attempt]) k = (1 eG)k

    Hence, Prob of successful tx. in ( k + 1) attempts = (1 eG)k eG = 0.8647 k (0.1353)

    (c) Expected number of transmissions:

    [ ]

    ( )

    ( )

    ( ) ( )

    =

    =

    =

    =

    =

    =

    =

    =

    0

    1

    0

    1

    0

    1

    0

    .11

    1

    1

    ionstransmissinsuccessof Probionstransmissof numberExpected

    k

    k GG

    Gk

    k GG

    k

    Gk G

    k

    ek e

    e

    ek e

    eek

    k k

    Knowing that the summation

    ( ),

    1 20 x

    xkx

    k

    k

    =

    =

    the above summation reduces to

    ( )( )

    ( )G

    G

    G

    G

    G

    ee

    e

    e

    e =

    =

    2)1(1

    11

    ionstransmissof numberExpected ,

  • 8/13/2019 A4_sol

    3/4

    3

    which has a value of 7.3891.

    Question 4: Assume a 100Mbps CSMA-CD network over a 3 km coaxial cable. (Speed of light in coaxialcable is 2.3 10 8 m/s). The packets have 1,000 bits, including 100 bits of overhead in header and trailer.What is the maximum throughput of this network in information bits per second?

    Based on equation (6.9) in the text, the normalized maximum throughput of the system is given by

    ( ),

    1211

    max ae ++=

    where a = t prop / X . The frame transmission time X and propagation time t prop are given by

    X = Length of frame / transmission rate = 1000 / (100 10 6) = 10 5 secondst prop = distance / propagation speed = 3000 / (2.3 10 8) = 1.3043 10 5 seconds

    which gives a = 1.3043.

    The normalized maximum throughput of the system is, therefore, given by

    ( ).1064.0

    3043.11211

    max =++= e

    In terms of information bits per second, the throughput of the system is

    . bps105793.910frame1in bits100

    bitsninformatio901064.0 bpsinsystemof Throughput 68 =

    =

    Question 5: Consider a 100 Mbps 100BaseT Ethernet. In order to have an efficiency of 0.5, what should bethe maximum distance between two nodes in the network.Assume a frame length of 64 bytes and that there are no repeaters. Does this maximum distance also ensuresthat a transmitting node A will be able to detect whether any other node transmitted while A wastransmitting? Why or why not? Assume a propagation speed of 1.8 10 8m/s.

    We want an efficiency of = 1/(1 + (1+2 e)a) = 0.5, which results in the value of a = 0.1554.

    Since a = t prop / X = 0.1554, therefore, t prop = 0.1554 X .

    The frame transmission time X is computed from the given specifications of frame length L = 64 8 = 512 bits and transmission rate R = 100Mbps. This gives X = L/ R = 512/10 8 = 5.12 s.

    The propagation time is given by t prop = 0.1554(5.12) = 0.7955 s.

    Maximum distance between nodes = t prop propagation speed = (0.7955 10 6) 1.8 10 8 = 143m.

    For transmitting station A to detect whether any other station transmitted during A's interval, the frametransmission time X must be greater than 2 t prop or 1.591 s.Because the transmission time X is greater than 2 t prop , A will detect B's signal before the end of itstransmission.

  • 8/13/2019 A4_sol

    4/4

    4

    Question 6: A very heavily loaded 1-km long, 10 Mbps token ring has a propagation speed of 200 m/ sec.Fifty stations are uniformly spaced around the ring. Data frames are 256 bits, including 32 bits of overhead.The token is 8 bits long. Is the effective data rate of this ring higher or lower than the effective data rate of a10 Mbps CSMA/CD network? Assume Early Token Release policy!

    Measured from the time of token capture, it takes 25.6 s to transmit a packet. Additionally, a token must betransmitted, taking 0.8 s, and the token must propagate 1km/50 = 20meters, taking another 0.1 s. Thus, wehave sent 224 bits in 26.5 s for a data rate of 224 bits/26.5 s or 8.5Mbps.

    Given the above parameters, the token ring beats the Ethernet in terms of effective bandwidth.