Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Network Examination Solutions: Terms Explanation and Calculations, Exams of Computer Science

Solutions to a network examination covering topics such as isarithmic flow control, idle token, hamming distance, congestion control methods, crc encoding, go-back-n, network design, and packet delay calculations.

Typology: Exams

2009/2010

Uploaded on 03/28/2010

koofers-user-v7i
koofers-user-v7i 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 164 Fall 1994
Final Examination
SOLUTIONS
3Hours, Closed Book
Aids allowed: Calculator
I. Briefly explain the following terms:
(i) isarithmic flowcontrol; atechnique for limiting congestion by restricting the total number
of packets in the subnet. eachpacketneeds to acquirea"permit" beforeitcan enter the sub-
net, and the total number of "permits" is fixed.
(ii) chokepacket; acontrol packetgenerated within the subnet at a congested node and sent
backtoahost that is responsible for (some of) the traffic at the node.when the host receives
the chokepacket, it reduces its transmission rate for a while.
(iii) idle token; acontrol symbol in token ring networks that is used to grant transmission
rights to a host. Ahost wishing to transmit must wait for the arrival of the idle token, con-
vert it to a busy token and send its packet, and then generate a newidle token.
(iv) Hamming distance; Amethod of evaluating the robustness of digital codes subject to bit
errors. The Hamming distance for 2 codewords is the number of bit positions wheretheydif-
fer,and the Hamming distance for a code is the minimum across all pairsofcodewords.
(v) idempotency; The property that an operation can be repeated without changing the
result. If A==0 initially,then "A=A+1;" and "A=1;" have the same effect, but only the sec-
ond form is idempotent.
(vi) quarantining. atechnique for ensuring all-or-nothing execution of remote operations.
The information about the desired transaction is gathered first (ie., kept in quarantine) and is
then executed when all is available.Otherwise,you could get stuckpart way through if you
start the operation beforeall the data arepresent.
II. Name three methods for controlling congestion in packet-switched networks. Describe each
one using a fewsentences. For each method, state whether or not it is equally good for vir-
tual circuit and datagram networks.
Tanenbaum, section 5.3, lists the following five methods, any 3 of whichwould be ok: (1)
preallocation of buffers; (2) packetdiscarding; (3) isarithmic; (4) flow control; (5) choke
packets. I would accept any sensible argument about the applicability.Generally speaking,
Ithink (1) is best left for VCs (since thereare too many places a datagram could go to preal-
locate things); (2) is best for datagrams, since VCs normally assume in order delivery so it
would mess things up; (3) would be best for datagrams because it is ineffective in VC sys-
tems because it won’tstop local hot spots, but thereare fewer obviously better alternatives
with datagrams; (4) works OK with both, but VCs generally use small windows on a hop-by-
hop basis, whereas datagrams use a big end-end window; and (5) chokepackets arereally
only intended for datagram nets, although I suppose theycould work in a VC environment if
1December 12, 1995
pf3
pf4
pf5

Partial preview of the text

Download Network Examination Solutions: Terms Explanation and Calculations and more Exams Computer Science in PDF only on Docsity!

CS 164 Fall 1994 Final Examination

S O L U T I O N S

3 Hours, Closed Book Aids allowed: Calculator

I. Briefly explain the following terms:

(i) isarithmic flow control; a technique for limiting congestion by restricting the total number of packets in the subnet. each packet needs to acquire a "permit" before it can enter the sub- net, and the total number of "permits" is fixed.

(ii) choke packet; a control packet generated within the subnet at a congested node and sent back to a host that is responsible for (some of) the traffic at the node. when the host receives the choke packet, it reduces its transmission rate for a while.

(iii) idle token; a control symbol in token ring networks that is used to grant transmission rights to a host. A host wishing to transmit must wait for the arrival of the idle token, con- vert it to a busy token and send its packet, and then generate a new idle token.

(iv) Hamming distance; A method of evaluating the robustness of digital codes subject to bit errors. The Hamming distance for 2 codewords is the number of bit positions where they dif- fer, and the Hamming distance for a code is the minimum across all pairs of codewords.

(v) idempotency; The property that an operation can be repeated without changing the result. If A==0 initially, then "A=A+1;" and "A=1;" have the same effect, but only the sec- ond form is idempotent.

(vi) quarantining. a technique for ensuring all-or-nothing execution of remote operations. The information about the desired transaction is gathered first (ie., kept in quarantine) and is then executed when all is available. Otherwise, you could get stuck part way through if you start the operation before all the data are present.

II. Name three methods for controlling congestion in packet-switched networks. Describe each one using a few sentences. For each method, state whether or not it is equally good for vir- tual circuit and datagram networks.

Tanenbaum, section 5.3, lists the following five methods, any 3 of which would be ok: (1) preallocation of buffers; (2) packet discarding; (3) isarithmic; (4) flow control; (5) choke packets. I would accept any sensible argument about the applicability. Generally speaking, I think (1) is best left for VCs (since there are too many places a datagram could go to preal- locate things); (2) is best for datagrams, since VCs normally assume in order delivery so it would mess things up; (3) would be best for datagrams because it is ineffective in VC sys- tems because it won’t stop local hot spots, but there are fewer obviously better alternatives with datagrams; (4) works OK with both, but VCs generally use small windows on a hop-by- hop basis, whereas datagrams use a big end-end window; and (5) choke packets are really only intended for datagram nets, although I suppose they could work in a VC environment if

you really wanted.

III.

a. For a binary message 1001011101001111 , compute its CRC code using the polyno- mial x^8 + x^7 + x^2 + 1. Your should use long division method to solve it. 1110011111011010


110000101 ˆˆˆˆˆˆˆˆ CRC needs 8 bits of padding to be added, --------- and not just the plain long division... 0101010111 110000101


0110100100 110000101


000100001011 110000101


0100011101 110000101


0100110001 110000101


0101101000 110000101


0111011010 110000101


00101111100 110000101


0111110010 110000101


00111011100 110000101


0010110010 ˆˆˆˆˆˆˆˆˆ these 8 digits are the CRC. b. For CRC encoding, The long division method is not suitable for programming. Describe a simpler algorithm using a 8 bit shift register to solve this problem. You don’t need to re-do the computation, just describe the algorithm in a high level language.

b. Draw both networks and indicate the flow each channel in each case. Sorry, it’s too hard to try to draw these with the available tools... Config #1 is fully con- nected with link capacities of 4 packets/sec. everywhere and flows given in the above table. Config #2 only has R-L and R-S links, each with capacities of 8 packets/sec, and flows given in the table below. L R S L - 5 - R 4 - 5 S - 4.5 - c. Find the average path length. Obviously, n = 1 for Config #1. For Config #2 we sum up the flows in the table above

and divide by  to get 18. 5/14. 5 = 1. 27.

d. Find the overall mean packet delay in each case. Config #1: T = 1. 06, Config #2: T = 0. 39. e. [Bonus question — the answer is short but it’s tricky] You should have found that three-line design had a higher delay than the two-line design. Since alternate routing is possible with three lines, and since there was no effort to optimize the routing, your boss asks whether your answer to part (a) is valid. Give a convincing argument to show him that no amount of rerouting of traffic would make the overall mean packet delay for the three-line design as small as the delay for the two-line design? Optimal routing tries to balance the traffic in each link (think of the "square root rule"). That traffic would cover at least one hop. Therefore, in the best case, the flow in each direction over each link would be at least 14.5/6 packets/sec, which gives a delay of 1 4 − 2. 4

VI. The next generation of Metropolitan Area Networks (MANs) is expected to run at data rates in excess of 1 Gbit/sec (i.e., 10^9 bps) and span distances on the order of 100 kilometres. a. For CSMA/CD to work properly, the transmission time for a packet needs to be at least twice the end-to-end propagation delay across the network. Assuming a propagation speed of 2 × 108 metres/sec. through optical fibre, what would be the minimum packet size for CSMA/CD on such a Gigabit MAN? The worst case one-way propagation delay is 105 m. / 2 * 10^8 m/sec. = 5 * 10−^4 sec. Minimum packet transmission time is twice this, or 10 −^3 sec, which at 109 bits/sec rep- resents 106 bits. b. What is the maximum throughput that a single station could achieve using 10,000 bit packets on a 1 Gbit/sec. token ring, assuming ordinary service (i.e., one packet per visit of the token) and a total ring circumference of 200 kilometres? Max throughput by one station happens when nobody else gets in the way to delay its attempts. In each "cycle", the station sends 104 bits, and the time to do it is 104 /10^9 = 10 −^5 for transmission and 10 −^3 sec. for the idle token to go around a 200 km ring before the next turn. Therefore the throughput is

104 bits

  1. 01 * 10−^5 sec

= 107 bits / sec

c. The most likely architecture for this type of Gigabit MANs uses small packets (roughly 500 bits, for compatibility with ISDN switches), and a medium access control protocol vaguely similar to the slotted ring. How many slots would there be on a 200 kilometre ring? How large a window size would be required to allow the sender to keep going without stopping? How practical would the Selective-Repeat ARQ be in this applica- tion? From above, a 200 km ring can store 106 bits, which is 2000 slots. But since the ACK comes at the END of the slot, the minimum window size is 2001. This isn’t very practi- cal for selective repeat.

VII. Consider an error recovery technique where, in the event of an error, you don’t repeat the damaged packet. Instead you send blocks of extra error correction information that can be combined with the damaged packet to repair the damage. Under this scheme, assume that the initial transmission will contain an error with probability 1/2. If there is an error, the sender will send a first block of extra error correction information that will allow the receiver to correct the damaged packet with probability 3/4. And, if there is still an error, the sender will send a second block of extra error correction information that is guaranteed to correct the damaged packet. a. What is the average service time for a packet, assuming it takes 1 second to transmit each packet or block of error correction information, and that the time until the receiver returns an acknowledgement is negligible? 1/2 of the time, you get through in 1 second; 1/23/4 = 3/8 of the time you have a first error but get through on the second try using 2 seconds; 1/21/4 = 1/8 of the time you have a first error AND a second error, and get through in 3 seconds. Therefore

X =

b. If the arrival rate of new packets is 0.4 packets/second, what is the average packet delay in this system? We need to apply the M/G/1 formula, since the service time has this funny 3-valued dis- tribution instead of an exponential. First we need the second moment of the service time:

X^2 =

Now we plug  = 0. 4 , X = 1/ = 1. 625 ,  = 0. 4 * X = 0. 65 and X^2 = 3. 125 into the

PK equation to get

T =

X^2

FORMULAS:  =

j = 0

Σ x^

j (^) = 1 1 − x

if | x | < 1.

M/M/1:  k = (1 −  )  k^ ; N =

; T =

Mean Residual Life:

X^2

2 X

; M/G/1: T =

X^2

END OF EXAMINATION