Skip to content

Latest commit

 

History

History
154 lines (105 loc) · 9.34 KB

7.CN_GateQuestions.md

File metadata and controls

154 lines (105 loc) · 9.34 KB

Data Link Layer questions

1. Determine the maximum length of the cable (in km) for transmitting data at a rate of 500 Mbps in an Ethernet LAN with frames of size 10,000 bits. Assume the signal speed in the cable to be 2,00,000 km/s.

a) 1 b) 2 c) 2.5 d) 5 Data should be transmitted at the rate of 500 Mbps. Transmission Time >= 2Propagation Time => 10000/(5001000000) <= 2*length/200000 => lenght = 2km (max) so, answer will be: (B) 2km

2.Let G(x) be the generator polynomial used for CRC checking. What is the condition that should be satisfied by G(x) to detect odd number of bits in error?

a) G(x) contains more than two terms b) G(x) does not divide 1+x^k, for any k not exceeding the frame length c) 1+x is a factor of G(x) d) G(x) has an odd number of terms. Odd number of bit errors can be detected if G(x) contains (x+1) as a factor. See this for proof. Ans. (c)

3. Frames of 1000 bits are sent over a 10^6 bps duplex link between two hosts. The propagation time is 25ms. Frames are to be transmitted into this link to maximally pack them in transit (within the link). What is the minimum number of bits (i) that will be required to represent the sequence numbers distinctly? Assume that no time gap needs to be given between transmission of two frames.

a)i=2 b)i=3 c)i=4 d)i=5 Transmission delay for 1 frame = 1000/(10^6) = 1 ms Propagation time = 25 ms The sender can atmost transfer 25 frames before the first frame reaches the destination. The number of bits needed for representing 25 different frames = 5 Ans. (d)

4.Consider the data of previous question. Suppose that the sliding window protocol is used with the sender window size of 2^i where is the number of bits identified in the previous question and acknowledgments are always piggybacked. After sending 2^i frames, what is the minimum time the sender will have to wait before starting transmission of the next frame? (Identify the closest choice ignoring the frame processing time.)

a)16ms b)18ms c)20ms d)22ms Size of sliding window = 2^5 = 32 Transmission time for a frame = 1ms Total time taken for 32 frames = 32ms The sender cannot receive acknoledgement before round trip time which is 50ms After sending 32 frames, the minimum time the sender will have to wait before starting transmission of the next frame = 50 – 32 = 18 Ans. (b)

5.In Ethernet when Manchester encoding is used, the bit rate is:

a)Half the baud rate b)Twice the baud rate c)Same as the baud rate d)None of the above Ans (a)

6.There are n stations in a slotted LAN. Each station attempts to transmit with a probability p in each time slot. What is the probability that ONLY one station transmits in a given time slot?

a)(1-p)^(n-1) b)np(1-p)^(n-1) c)p(1-p)^(n-1) d)1-(1-p)^(n-1) P(X) = Probability that station X attempts to transmit = P P (-X) = Probability that station X does not transmit = 1-P Required is: Probability that only one station transmits = y Y = (A1, -A2, -A3... -An) + (-A1, A2, A3....-An) + (-A1, -A2, A3...-An) + ... + (-A1, -A2, -A3...An) = (p*(1-p)(1-p)... (1-p) + (1-p)p(1-p)...(1-p) + ... = p*(1-p)^(n-1) + p*(1-p)^n-1 + .... + p*(1-p)^(n-1) = np(1-p)^(n-1) Ans (b)

7.In a token ring network the transmission speed is 10^7 bps and the propagation speed is 200 metres/micro second. The 1-bit delay in this network is equivalent to:

a)500 metres of cable. b)200 metres of cable. c)20 metres of cable d)50 metres of cable Ans (c)

8. The message 11001001 is to be transmitted using the CRC polynomial x^3 + 1 to protect it from errors. The message that should be transmitted is:

a)11001001000 b)11001001011 c)11001010 d)110010010011 Ans. (b)

9.Consider a token ring network with a length of 2 km having 10 stations including a monitoring station. The propagation speed of the signal is 2 × 108 m/s and the token transmission time is ignored. If each station is allowed to hold the token for 2 μsec, the minimum time for which the monitoring station should wait (in μsec)before assuming that the token is lost is _______.

a)28 to 30 b)20 to 22 c)0 to 2 d)31 to 33 Ans. (a) Length = 2 km Propagation Speed v = 2*10^8 m/s Token Holding Time = 2 micro sec

    Waiting time
    = length/speed + (#stations - 1)*(token holding time) to
     length/speed + (#stations)*(token holding time)
     = 28 to 30

10. Consider a selective repeat sliding window protocol that uses a frame size of 1 KB to send data on a 1.5 Mbps link with a one-way latency of 50 msec. To achieve a link utilization of 60%, the minimum number of bits required to represent the sequence number field is ________.

a) 3 b) 4 c) 5 d) 6 Ans. (c)

Transmission delay = Frame Size/bandwidth
               = (1*8*10^3)/(1.5 * 10^6)=5.33ms
Propagation delay = 50ms
Efficiency = Window Size/(1+2a) = .6
a = Propagation delay/Transmission delay
So, window size = 11.856(approx)
min sequence number = 2*window size = 23.712
bits required in Min sequence number = log2(23.712)
Answer is 4.56
Ceil(4.56) = 5

11. A bit-stuffing based framing protocol uses an 8-bit delimiter pattern of 01111110. If the output bit-string after stuffing is 01111100101, then the input bit-string is

a) 0111110100 b)0111110101 c)0111111101 d)0111111111 Ans. (b)

8-bit delimiter pattern is 01111110.

The output bit-string after stuffing is 01111100101.
The above highlighted bit is stuffed bit.
So input bit-string must be 0111110101.

12.Station A uses 32 byte packets to transmit messages to Station B using a sliding window protocol. The round trip delay between A and B is 80 milliseconds and the bottleneck bandwidth on the path between A and B is 128 kbps. What is the optimal window size that A should use?

a)20 b)40 c)160 d)320 Ans. (b) Round Trip propagation delay = 80ms Frame size = 328 bits Bandwidth = 128kbps Transmission Time = 328/(128) ms = 2 ms

                                Let n be the window size.

                                UtiliZation = n/(1+2a) where a
                                            = Propagation time /
                                                transmission time
                                            = n/(1+80/2)

                                For maximum utilization: n = 41
                                which is close to option (B)

13. Suppose the round trip propagation delay for a 10 Mbps Ethernet having 48-bit jamming signal is 46.4 ms. The minimum frame size is

A a)94 b)416 c)464 d)512 Ans. (c)

14. How many 8-bit characters can be transmitted per second over a 9600 baud serial communication link using asynchronous mode of transmission with one start bit, eight data bits, two stop bits, and one parity bit ?

a) 600 b)800 c)876 d)1200 Ans (b)

        "9600 baud" means that the serial port is capable of transferring a
        maximum of 9600 bits per second.

        Total Data To send = 1 bit(start) + 8 bits(char size) + 1 bit(Parity) + 2 bits(Stop)

        = 12 bits.

        Number of 8-bit characters that can be transmitted per second  = 9600/12 = 800.

15.A and B are the only two stations on an Ethernet. Each has a steady queue of frames to send. Both A and B attempt to transmit a frame, collide, and A wins the first backoff race. At the end of this successful transmission by A, both A and B attempt to transmit and collide. The probability that A wins the second backoff race is:

a)0.5 b)0.625 c)0.75 d)1.0 Ans (b)

           This is basically the question related to unfairness of exponential back-off algorithm called 'capture effect'.
           The solution to the above problem goes like this: At every attempt to transit a frame, both A and B chooses value of 'k' randomly.
           Based on the value of 'k', back-off time is calculated as a multiple of 'k'.
           The station or node having the smaller back-off time gets to send the frames eariler.
           1st attempt: Value of 'k' would be k=0 or k=1 (0 <= k <= 2^n-1; where n=nth attempt).
           Since A won the first race, A must have chosen k=0 and B must have chosen k=1 (A wins here with probability 0.25).
           As A won, A will again choose k=0 or k=1 for its 2nd frame, but B will choose k=0,1,2 or 3 as B failed to send its first frame in the first attempt.
           2nd attempt: Let kA= value of k chosen by A and kB = value of k chosen by B. We will use notation (kA,kB) to show the possible values.
           Now the sample space for the 2nd attempt is (kA,kB) = (0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,2) or (1,3) i.e. 8 possible outcomes.
           For A to win, kA should be less than kB (kA < kB).
           Thus, our event space is (kA, kB) = (0,1),(0,2),(0,3),(1,2),(1,3) i.e. 5 possible outcomes.
           Thus the probability that A wins the 2nd back-off race = 5/8 = 0.625