ee132b hw3 sol

7
EE132B-HW Set #3 UCLA 2014 Fall Prof. Izhak Rubin Problem 1 Consider a broadcasting bus system as shown in Figure 1. Attaching to the bus are N stations, and they share the channel under pure ALOHA scheme. Suppose that the transmission rate is R (bits/sec), and the message size is M bits. Neglect the effect of propagation delay. 1 2 i i+1 N Broadcasting Bus Statin i Figure 1: A broadcasting bus system with N statoins (a) How long does it take to transmit a single message? (b) Let T i denote the idle time for station i. Suppose that T i is exponentially distributed with parameter λ i , and {T i | i =1, 2,...,N } is a set of independent random variables. Let T denote the idle time for the broadcast channel. Note that the channel is idle when every station is idle. What is the distribution function for T (i.e., P (T t))? (c) Suppose that the channel is idle and station i initiates a message transmission at time 0. What is the collision probability for this message transmission? Ans: (a) If no collision occurs, it will take M R seconds to transmit a single message. (b) The distribution for the idle time of the broadcast channel is given by P (T>t)= P (min{T i | i =1, 2,...,N } >t) = P (T 1 > t, T 2 >t,...,T N >t) = P (T 1 >t)P (T 2 >t) ...P (T N >t) = e -λ 1 t e -λ 2 t ...e -λ N t = e -(λ 1 +λ 2 +···+λ N )t . Therefore, P (T t)=1 - e -(λ 1 +λ 2 +···+λ N )t , which is an exponential distribution with parameter λ 1 + λ 2 + ··· + λ N . 1

Upload: dylan-ler

Post on 28-Sep-2015

245 views

Category:

Documents


11 download

DESCRIPTION

ee

TRANSCRIPT

  • EE132B-HW Set #3 UCLA 2014 Fall Prof. Izhak Rubin

    Problem 1Consider a broadcasting bus system as shown in Figure 1. Attaching to the bus

    are N stations, and they share the channel under pure ALOHA scheme. Supposethat the transmission rate is R (bits/sec), and the message size is M bits. Neglectthe effect of propagation delay.

    1 2 i i+1 N

    Broadcasting Bus

    Statin i

    Figure 1: A broadcasting bus system with N statoins

    (a) How long does it take to transmit a single message?

    (b) Let Ti denote the idle time for station i. Suppose that Ti is exponentiallydistributed with parameter i, and {Ti | i = 1, 2, . . . , N} is a set of independentrandom variables. Let T denote the idle time for the broadcast channel. Notethat the channel is idle when every station is idle. What is the distributionfunction for T (i.e., P (T t))?

    (c) Suppose that the channel is idle and station i initiates a message transmissionat time 0. What is the collision probability for this message transmission?

    Ans:

    (a)

    If no collision occurs, it will take MR

    seconds to transmit a single message.

    (b)The distribution for the idle time of the broadcast channel is given by

    P (T > t) = P (min{Ti | i = 1, 2, . . . , N} > t)= P (T1 > t, T2 > t, . . . , TN > t)= P (T1 > t)P (T2 > t) . . . P (TN > t)= e1te2t . . . eN t

    = e(1+2++N )t.

    Therefore, P (T t) = 1 e(1+2++N )t, which is an exponential distribution withparameter 1 + 2 + + N .

    1

  • EE132B-HW Set #3 UCLA 2014 Fall Prof. Izhak Rubin

    (c)The probability that this message transmission will not be unsuccessful.

    P (no collision) = P (T1 >M

    R, . . . , Ti1 >

    M

    R, Ti+1 >

    M

    R, . . . , TN >

    M

    R)

    = e(1++i1+i+1++N )MR = e(N

    k=1,k 6=i k)MR

    P (collision) = 1 P (no collision) = 1 e(N

    k=1,k 6=i k)MR .

    Problem 2Consider a slotted token ring system with N stations. The token travels in the

    counter clockwise direction as shown in Figure 2. In this polling system, a busystation will capture the token and hold it for the duration of its frame transmission.It then releases the token and makes it available for capture by the neighboringstation along the ring network. Assume for our analysis that each station holdsthe token for a random period of time. Let Hi denote the token holding time ofstation i (measured in units of slots). Assume that {Hi | i = 1, 2, . . . , N} is a setof independent and identically distributed (i.i.d.) random variables. We also assumethat Hi is governed by a geometric distribution with parameter 1 p such thatP (Hi = n) = p(1 p)n,n = 0, 1, . . . . Note that p represents the probability thatstation i releases the token at the end of a time slot.

    Station Random holding time1 H12 H23 H3

    N HN

    Station 1

    Station 2

    Station 3

    Station NToken ring direction

    Station j

    Figure 2: The slotted token ring network

    (a) Neglect the propagation delay in the system. Suppose that station 1 receivesthe token at the start of time slot 0. Calculate the probability that station 3receives the token at the start of slot k. Note that k can be equal to 0, sincewe neglect the propagation delay as well as assume (as an approximation) thata non-busy station will hold the token for negligible period of time that is sethere equal to 0.

    (b) The probability that station 1 will receive the token again at the start of slotk. (Hint: The sum of r i.i.d. Geometric random variables with parameter pfollows a negative binomial distribution with parameter (r, p).)

    2

  • EE132B-HW Set #3 UCLA 2014 Fall Prof. Izhak Rubin

    (c) Suppose that the propagation delay from any station to its adjacent station is slots. What is the throughput rate of this system? (HINT: Consider a cycleperiod (occurring between successive visits of the token to the same station).Calculate the throughput rate as the ratio between the average amount of "work"performed by stations during a cycle to the average duration of the cycle. Astation is said to perform "work" when it holds the token; its amount of "work"is set equal to the time that it holds the token.)

    Ans:

    (a)The probability that station 3 receives the token at the start of slot k is given by

    P (H1 +H2 = k) = fH1 fH2(k)

    =k

    n=0P (H1 +H2 = k | H1 = n)P (H1 = n)

    =k

    n=0P (H2 = k n)P (H1 = n)

    =k

    n=0p(1 p)knp(1 p)n

    =k

    n=0p2(1 p)k = (k + 1)p2(1 p)k.

    (b)Based on the hint, the probability that station 1 receives the token ring again at

    the start of slot k is given by

    P (H1 +H2 + +HN = k) = fH1 fH2 fHN (k)

    =(k +N 1

    k

    )(1 p)Npk.

    (c)The throughput rate measures the average amount of work per unit time. The

    amount of performed work is measured as the total time spent by stations in holdingthe token. Define a cycle to be the time elapsed from the instant the token is receivedby any station to the earliest instant it is received by the same station. Consider theamount of work during a cycle denoted by W . Then, the average amount of workduring a cycle is given by

    E[W ] = E[Ni=1

    Hi

    ]=

    Ni=1

    E [Hi] =N(1 p)

    p,

    3

  • EE132B-HW Set #3 UCLA 2014 Fall Prof. Izhak Rubin

    and the average length of a cycle is E[W ] +N . Thus, we have the throughput rate(denoted as ), which is given by

    = E[W ]E[W ] +N =

    N(1p)p

    N(1p)p

    +N=

    1pp

    (1p)p

    + = 1 p1 p+ p. (1)

    Problem 3(a) In a few words, describe the most significant difference between circuit-switching

    and packet-switching systems. Is email system a circuit-switching or a packet-switching system?

    (b) Outline the key differences between datagram and virtual-circuit switching sys-tems.

    (c) Consider the following situations in conjunction with multiple access schemes.Which multiple access scheme is typically employed in each situation?

    (i) You are waiting at an intersection with 4-way stop sign.(ii) You present your research work at a small conference where you raise your

    hand before you speak.(iii) You let your child use your car every Saturday night.(iv) You are trying to take the elevator in ENGINEERING IV Bldg.

    Ans:

    (a)The most critical difference between circuit switching and packet switching sys-

    tems is that the circuit switching system provides dedicated space, time, and/orfrequency resource to a user, regardless of the frequency and the efficiency of theresource utilization by the user. The packet switching network system does not ded-icate link capacity resources to a user flow. It allocates resources to a user when theuser needs such a resource. Email applications are typically carried over a packetswitching network system.

    (b)In the virtual circuit approach to packet switching, the relationship between all

    packets belonging to the message or a session is preserved. A single route is chosenbetween the sender and the receiver at beginning of the session. When the data aresent, all packets of transmission travel one after another along that route. In theother approach of packet switching that is the datagram approach, each packet istreated independently of all others. Even if one packet is just a piece of a muti-packettransmission, the network treats it as though it is existed alone.

    4

  • EE132B-HW Set #3 UCLA 2014 Fall Prof. Izhak Rubin

    (c)There is no absolutely correct answer. Possible answers are:

    (i) Statistical multiplexing: ATDM(ii) Reservation (demand assigned TDMA)(iii) TDMA(iv) Reservation (demand assigned TDMA)

    Problem 4

    A

    B

    C

    D

    E

    F

    G

    H

    I

    J

    K

    L

    M

    N

    O

    P

    4 by 4

    switch

    Time-division multiplexer

    1

    2

    3

    4

    1

    3

    4

    2

    Figure 3: A switching network

    Consider a switching network illustrated in the Figure 3. Suppose that this net-work is a circuit switching system. Also assume that this network is a one-directionalsystem (i.e., the users on the left hand can only send and the users on the right canonly receive). The users are identified by indices A,B, . . . , P , and the lines are num-ber as 1, 2, 3, 4. The switch is a 4 by 4 switch. Each input port of the switch receivesthe output of a time-division multiplexer which produces two slots per frame. Forexample, at Line 1 on the transmitting terminals side, User A is assigned slot 1 anduser B is assigned slot 2. Assume that the user on the top is always assigned slot 1.During busy hours, the routing table for the switch is set in Table 1.

    (a) Let (X, Y ) denote that user X is connected to user Y . List all the connectionsin the system based on the routing Table 1.

    (b) If Lines 2 and 4 on the transmitting side fail, and Line 1 on the receiving sidefails, which connection(s) survive(s)?

    (c) Suppose that we only have connections (A,O), (D,P ), (G,N), (H, I), and (E,M).Make a new routing table.

    5

  • EE132B-HW Set #3 UCLA 2014 Fall Prof. Izhak Rubin

    Input Port Output PortLine NO. Slot NO. Line NO. Slot NO.

    1 1 3 13 1 2 14 1 3 23 2 4 12 2 4 24 2 2 21 2 1 12 1 1 2

    Table 1: Routing table

    (d) Suppose that the service provided is the transmission of stereo digital audiosignals which is sampled at 22.4 kHz. These samples are quantized to 256levels. What is the minimum transmission rate (bits/sec) for the time-divisionmultiplexer?

    Ans:

    (a)(A,M), (E,K), (G,N), (F,O), (D,P ), (H,L), (B, I), (C, J).

    (b)(A,M), (E,K), (F,O).

    (c)

    Input Port Output PortLine NO. Slot NO. Line NO. Slot NO.

    1 1 4 12 2 4 24 1 3 24 2 1 13 1 3 1

    Table 2: The new Routing table

    (d)The frame duration time must be equal to the length of sampling interval. Thus,

    the frame duration time is 122.4 kHz = 44.64 sec. Since each frame has two slots,the slot duration time is 22.32 sec. The number of quantization levels is 256 so that

    6

  • EE132B-HW Set #3 UCLA 2014 Fall Prof. Izhak Rubin

    each sample is represented as a binary code of 8 bits. Note that a slot per frame isassigned for a station. Therefore, a station must transmit at least 8 bits during a slotand the minimum transmission rate is therefore equal to ( 8 bits22.32 sec) = 358 kbps.

    7

    Statistical multiplexing: ATDMReservation (demand assigned TDMA)TDMAReservation (demand assigned TDMA)