



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
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
1 / 6
This page cannot be seen from the preview
Don't miss anything!
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
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
= 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 =
PK equation to get
∞
j = 0
j (^) = 1 1 − x
if | x | < 1.
Mean Residual Life: