Docsity

Soluciones Tanenbaum (RSC1), Apuntes de Ingeniería de Telecomunicaciones

Toggle sidebar
bg1
COMPUTER NETWORKS
FOURTH EDITION
PROBLEM SOLUTIONS
ANDREW S. TANENBAUM
Vrije Universiteit
Amsterdam, The Netherlands
PRENTICE HALL PTR
UPPER SADDLE RIVER, NJ 07458
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30

Vista previa parcial del texto

¡Descarga Soluciones Tanenbaum (RSC1) y más Apuntes en PDF de Ingeniería de Telecomunicaciones solo en Docsity!

COMPUTER NETWORKS

FOURTH EDITION

PROBLEM SOLUTIONS

ANDREW S. TANENBAUM

Vrije Universiteit Amsterdam, The Netherlands

PRENTICE HALL PTR

UPPER SADDLE RIVER, NJ 07458

© 2003 Pearson Education, Inc. Publishing as Prentice Hall PTR Upper Saddle River, New Jersey 07458

All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher.

Printed in the United States of America

10 9 8 7 6 5 4 3 2 1

ISBN 0-13-046002-

Pearson Education LTD. Pearson Education Australia PTY, Limited Pearson Education Singapore, Pte. Ltd. Pearson Education North Asia Ltd. Pearson Education Canada, Ltd. Pearson Educación de Mexico, S.A. de C.V. Pearson Education — Japan Pearson Education Malaysia, Pte. Ltd.

8. Call the routers A , B , C , D , and E. There are ten potential lines: AB , AC , AD , AE , BC , BD , BE , CD , CE , and DE. Each of these has four possibilities (three speeds or no line), so the total number of topologies is 4 10 = 1,048,. At 100 ms each, it takes 104,857.6 sec, or slightly more than 29 hours to inspect them all. 9. The mean router-router path is twice the mean router-root path. Number the levels of the tree with the root as 1 and the deepest level as n. The path from the root to level n requires n − 1 hops, and 0.50 of the routers are at this level. The path from the root to level n − 1 has 0.25 of the routers and a length of n − 2 hops. Hence, the mean path length, l , is given by l = 0.5 × ( n − 1) + 0.25 × ( n − 2) + 0.125 × ( n − 3) +...

or

l = i = 1

Σ

∞ n (0.5) i^ − i = 1

Σ

∞ i (0.5) i

This expression reduces to l = n − 2_._ The mean router-router path is thus 2 n − 4_._

10. Distinguish n + 2 events. Events 1 through n consist of the corresponding host successfully attempting to use the channel, i.e., without a collision. The probability of each of these events is p (1 − p ) n^ −^1_._ Event n + 1 is an idle channel, with probability (1 − p ) n^. Event n + 2 is a collision. Since these n + 2 events are exhaustive, their probabilities must sum to unity. The proba- bility of a collision, which is equal to the fraction of slots wasted, is then just 1 − np (1 − p ) n^ −^1 − (1 − p ) n^. 11. Among other reasons for using layered protocols, using them leads to break- ing up the design problem into smaller, more manageable pieces, and layering means that protocols can be changed without affecting higher or lower ones, 12. No. In the ISO protocol model, physical communication takes place only in the lowest layer, not in every layer. 13. Connection-oriented communication has three phases. In the establishment phase a request is made to set up a connection. Only after this phase has been successfully completed can the data transfer phase be started and data trans- ported. Then comes the release phase. Connectionless communication does not have these phases. It just sends the data. 14. Message and byte streams are different. In a message stream, the network keeps track of message boundaries. In a byte stream, it does not. For exam- ple, suppose a process writes 1024 bytes to a connection and then a little later writes another 1024 bytes. The receiver then does a read for 2048 bytes. With a message stream, the receiver will get two messages, of 1024 bytes

each. With a byte stream, the message boundaries do not count and the receiver will get the full 2048 bytes as a single unit. The fact that there were originally two distinct messages is lost.

15. Negotiation has to do with getting both sides to agree on some parameters or values to be used during the communication. Maximum packet size is one example, but there are many others. 16. The service shown is the service offered by layer k to layer k + 1. Another service that must be present is below layer k , namely, the service offered to layer k by the underlying layer k − 1. 17. The probability, P (^) k , of a frame requiring exactly k transmissions is the proba- bility of the first k − 1 attempts failing, p k^ −^1 , times the probability of the k -th transmission succeeding, (1 − p ). The mean number of transmission is then just

k = 1

Σ

∞ kP (^) k = k = 1

Σ

∞ k (1 − p ) p k^ −^1 = 1 − p

333331

18. (a) Data link layer. (b) Network layer. 19. Frames encapsulate packets. When a packet arrives at the data link layer, the entire thing, header, data, and all, is used as the data field of a frame. The entire packet is put in an envelope (the frame), so to speak (assuming it fits). 20. With n layers and h bytes added per layer, the total number of header bytes per message is hn , so the space wasted on headers is hn. The total message size is M + nh , so the fraction of bandwidth wasted on headers is hn / ( M + hn ). 21. Both models are based on layered protocols. Both have a network, transport, and application layer. In both models, the transport service can provide a reliable end-to-end byte stream. On the other hand, they differ in several ways. The number of layers is different, the TCP/IP does not have session or presentation layers, OSI does not support internetworking, and OSI has both connection-oriented and connectionless service in the network layer. 22. TCP is connection oriented, whereas UDP is a connectionless service. 23. The two nodes in the upper-right corner can be disconnected from the rest by three bombs knocking out the three nodes to which they are connected. The system can withstand the loss of any two nodes. 24. Doubling every 18 months means a factor of four gain in 3 years. In 9 years, the gain is then 4^3 or 64, leading to 6.4 billion hosts. My intuition says that is much too conservative, since by then probably every television in the world and possibly billions of other appliances will be on home LANs connected to

teller machines and bank cards. Areas where such international standardiza- tion is lacking include VCRs and videotapes (NTSC VHS in the U.S., PAL VHS in parts of Europe, SECAM VHS in other countries), portable tele- phones, lamps and lightbulbs (different voltages in different countries), electr- ical sockets and appliance plugs (every country does it differently), photo- copiers and paper (8.5 x 11 inches in the U.S., A4 everywhere else), nuts and bolts (English versus metric pitch), etc.

SOLUTIONS TO CHAPTER 2 PROBLEMS

1. an = π n

333 −^1 , bn = 0, c = 1_._

2. A noiseless channel can carry an arbitrarily large amount of information, no matter how often it is sampled. Just send a lot of data per sample. For the 4 kHz channel, make 8000 samples/sec. If each sample is 16 bits, the channel can send 128 kbps. If each sample is 1024 bits, the channel can send 8. Mbps. The key word here is ‘‘noiseless.’’ With a normal 4 kHz channel, the Shannon limit would not allow this. 3. Using the Nyquist theorem, we can sample 12 million times/sec. Four-level signals provide 2 bits per sample, for a total data rate of 24 Mbps. 4. A signal-to-noise ratio of 20 dB means S/N = 100. Since log 2 101 is about 6.658, the Shannon limit is about 19.975 kbps. The Nyquist limit is 6 kbps. The bottleneck is therefore the Nyquist limit, giving a maximum channel capacity of 6 kbps. 5. To send a T1 signal we need H log 2 (1 + S /N ) = 1.544 × 10 6 with H = 50,. This yields S /N = 230 − 1, which is about 93 dB. 6. A passive star has no electronics. The light from one fiber illuminates a number of others. An active repeater converts the optical signal to an electri- cal one for further processing. 7. Use ∆ f = c ∆λ / λ^2 with ∆λ = 10 −^7 meters and λ = 10 −^6 meters. This gives a bandwidth (∆ f ) of 30,000 GHz. 8. The data rate is 480 × 640 × 24 × 60 bps, which is 442 Mbps. For simplicity, let us assume 1 bps per Hz. From Eq. (2-3) we get ∆λ = λ^2 ∆ f /c. We have ∆ f = 4.42 × 10 8 , so ∆λ = 2.5 × 10 −^6 microns. The range of wavelengths used is very short. 9. The Nyquist theorem is a property of mathematics and has nothing to do with technology. It says that if you have a function whose Fourier spectrum does not contain any sines or cosines above f , then by sampling the function at a

frequency of 2 f you capture all the information there is. Thus, the Nyquist theorem is true for all media.

10. In the text it was stated that the bandwidths (i.e., the frequency ranges) of the three bands were approximately equal. From the formula ∆ f = c ∆λ / λ^2 , it is clear that to get a constant ∆ f , the higher the frequency, the larger ∆λ has to be. The x-axis in the figure is λ, so the higher the frequency, the more ∆λ you need. In fact, ∆λ is quadratic in λ. The fact that the bands are approxi- mately equal is an accidental property of the kind of silicon used. 11. Start with λ f = c. We know that c is 3 × 108 m/s. For λ = 1 cm, we get 30 GHz. For λ = 5 m, we get 60 MHz. Thus, the band covered is 60 MHz to 30 GHz. 12. At 1 GHz, the waves are 30 cm long. If one wave travels 15 cm more than the other, they will arrive out of phase. The fact that the link is 50 km long is irrelevant. 13. If the beam is off by 1 mm at the end, it misses the detector. This amounts to a triangle with base 100 m and height 0.001 m. The angle is one whose tangent is thus 0.00001. This angle is about 0.00057 degrees. 14. With 66/6 or 11 satellites per necklace, every 90 minutes 11 satellites pass overhead. This means there is a transit every 491 seconds. Thus, there will be a handoff about every 8 minutes and 11 seconds. 15. The satellite moves from being directly overhead toward the southern hor- izon, with a maximum excursion from the vertical of 2φ. It takes 24 hours to go from directly overhead to maximum excursion and then back. 16. The number of area codes was 8 × 2 × 10, which is 160. The number of prefixes was 8 × 8 × 10, or 640. Thus, the number of end offices was limited to 102,400. This limit is not a problem. 17. With a 10-digit telephone number, there could be 10 10 numbers, although many of the area codes are illegal, such as 000. However, a much tighter limit is given by the number of end offices. There are 22,000 end offices, each with a maximum of 10,000 lines. This gives a maximum of 220 million telephones. There is simply no place to connect more of them. This could never be achieved in practice because some end offices are not full. An end office in a small town in Wyoming may not have 10,000 customers near it, so those lines are wasted. 18. Each telephone makes 0.5 calls/hour at 6 minutes each. Thus, a telephone occupies a circuit for 3 minutes/hour. Twenty telephones can share a circuit, although having the load be close to 100% (ρ = 1 in queueing terms) implies very long wait times). Since 10% of the calls are long distance, it takes 200 telephones to occupy a long-distance circuit full time. The interoffice trunk

29. A sampling time of 125 μsec corresponds to 8000 samples per second. According to the Nyquist theorem, this is the sampling frequency needed to capture all the information in a 4 kHz channel, such as a telephone channel. (Actually the nominal bandwidth is somewhat less, but the cutoff is not sharp.) 30. The end users get 7 × 24 = 168 of the 193 bits in a frame. The overhead is therefore 25/193 = 13%. 31. In both cases 8000 samples/sec are possible. With dibit encoding, two bits are sent per sample. With T1, 7 bits are sent per period. The respective data rates are 16 kbps and 56 kbps. 32. Ten frames. The probability of some random pattern being 0101010101 (on a digital channel) is 1/1024. 33. A coder accepts an arbitrary analog signal and generates a digital signal from it. A demodulator accepts a modulated sine wave only and generates a digital signal. 34. (a) 64 kbps. (b) 32 kbps. (c) 8 kbps. 35. The signal must go from 0 to A in one quarter of a wave—that is, in a time T / 4_._ In order to track the signal, 8 steps must fit into the quarter wave, or 32 samples per full wave. The time per sample is 1 /x so the full period must be long enough to contain 32 samples—that is, T > 32 /x or f (^) max = x / 32_._ 36. A drift rate of 10−^9 means 1 second in 10 9 seconds or 1 nsec per second. At OC-1 speed, say, 50 Mbps, for simplicity, a bit lasts for 20 nsec. This means it takes only 20 seconds for the clock to drift off by one bit. Consequently, the clocks must be continuously synchronized to keep them from getting too far apart. Certainly every 10 sec, preferably much more often. 37. Of the 90 columns, 86 are available for user data in OC-1. Thus, the user capacity is 86 × 9 = 774 bytes/frame. With 8 bits/byte, 8000 frames/sec, and 3 OC-1 carriers multiplexed together, the total user capacity is 3 × 774 × 8 ×8000, or 148.608 Mbps. 38. VT1.5 can accommodate 8000 frames/sec × 3 columns × 9 rows × 8 bits = 1.728 Mbps. It can be used to accommodate DS-1. VT2 can accommodate 8000 frames/sec × 4 columns × 9 rows × 8 bits = 2.304 Mbps. It can be used to accommodate European CEPT-1 service. VT6 can accommodate 8000 frames/sec × 12 columns × 9 rows × 8 bits = 6.912 Mbps. It can be used to accommodate DS-2 service. 39. Message switching sends data units that can be arbitrarily long. Packet switching has a maximum packet size. Any message longer than that is split up into multiple packets.

40. The OC-12c frames are 12 × 90 = 1080 columns of 9 rows. Of these, 12 × 3 = 36 columns are taken up by line and section overhead. This leaves an SPE of 1044 columns. One SPE column is taken up by path overhead, leaving 1043 columns for user data. Since each column holds 9 bytes of 8 bits, an OC-12c frame holds 75,096 user data bits. With 8000 frames/sec, the user data rate is 600.768 Mbps. 41. The three networks have the following properties: star: best case = 2, average case = 2, worst case = 2 ring: best case = 1, average case = n/ 4, worst case = n/ 2 full interconnect: best case = 1, average case = 1, worst case = 1 42. With circuit switching, at t = s the circuit is set up; at t = s + x /b the last bit is sent; at t = s + x /b + kd the message arrives. With packet switching, the last bit is sent at t = x /b. To get to the final destination, the last packet must be retransmitted k − 1 times by intermediate routers, each retransmission tak- ing p /b sec, so the total delay is x /b + ( k − 1) p /b + kd. Packet switching is faster if s > ( k − 1) p /b. 43. The total number of packets needed is x /p , so the total data + header traffic is ( p + h ) x /p bits. The source requires ( p + h ) x /pb sec to transmit these bits. The retransmissions of the last packet by the intermediate routers take up a total of ( k − 1)( p + h ) /b sec. Adding up the time for the source to send all the bits, plus the time for the routers to carry the last packet to the destination, thus clearing the pipeline, we get a total time of ( p + h ) x /pb + ( p + h )( k − 1) /b sec. Minimizing this quantity with respect to p , we find p = √^7 hx /^7777777 ( k − 1). 44. Each cell has six neighbors. If the central cell uses frequency group A , its six neighbors can use B , C , B , C , B , and C respectively. In other words, only 3 unique cells are needed. Consequently, each cell can have 280 frequencies. 45. First, initial deployment simply placed cells in regions where there was high density of human or vehicle population. Once they were there, the operator often did not want to go to the trouble of moving them. Second, antennas are typically placed on tall buildings or mountains. Depending on the exact loca- tion of such structures, the area covered by a cell may be irregular due to obs- tacles near the transmitter. Third, some communities or property owners do not allow building a tower at a location where the center of a cell falls. In such cases, directional antennas are placed at a location not at the cell center. 46. If we assume that each microcell is a circle 100 m in diameter, then each cell has an area of 2500π. If we take the area of San Francisco, 1.2 × 10 8 m 2 and divide it by the area of 1 microcell, we get 15,279 microcells. Of course, it is impossible to tile the plane with circles (and San Francisco is decidedly three-dimensional), but with 20,000 microcells we could probably do the job.

(−1 +1 −3 +1 − 1 −3 +1 +1) d (−1 +1 −1 +1 +1 +1 − 1 −1)/8 = 0 (−1 +1 −3 +1 − 1 −3 +1 +1) d (−1 +1 − 1 − 1 − 1 −1 +1 −1)/8 = 1 The result is that A and D sent 1 bits, B sent a 0 bit, and C was silent.

54. Ignoring speech compression, a digital PCM telephone needs 64 kbps. If we divide 10 Gbps by 64 kbps we get 156,250 houses per cable. Current systems have hundreds of houses per cable. 55. It is both. Each of the 100 channels is assigned its own frequency band (FDM), and on each channel the two logical streams are intermixed by TDM. This example is the same as the AM radio example given in the text, but nei- ther is a fantastic example of TDM because the alternation is irregular. 56. A 2-Mbps downstream bandwidth guarantee to each house implies at most 50 houses per coaxial cable. Thus, the cable company will need to split up the existing cable into 100 coaxial cables and connect each of them directly to a fiber node. 57. The upstream bandwidth is 37 MHz. Using QPSK with 2 bits/Hz, we get 74 Mbps upstream. Downstream we have 200 MHz. Using QAM-64, this is 1200 Mbps. Using QAM-256, this is 1600 Mbps. 58. Even if the downstream channel works at 27 Mbps, the user interface is nearly always 10-Mbps Ethernet. There is no way to get bits to the computer any faster than 10-Mbps under these circumstances. If the connection between the PC and cable modem is fast Ethernet, then the full 27 Mbps may be available. Usually, cable operators specify 10 Mbps Ethernet because they do not want one user sucking up the entire bandwidth.

SOLUTIONS TO CHAPTER 3 PROBLEMS

1. Since each frame has a chance of 0.8 of getting through, the chance of the whole message getting through is 0.8 10 , which is about 0.107. Call this value p. The expected number of transmissions for an entire message is then

E = i = 1

Σ

∞ ip (1 − p ) i^ −^1 = p i = 1

Σ

∞ i (1 − p ) i^ −^1

To reduce this, use the well-known formula for the sum of an infinite geometric series,

S = 1 = 1

Σ

∞ α i^ = 1 − α

333331

Differentiate both sides with respect to α to get

S ′ = i = 1

Σ

∞ i α i^ −^1 = (1 − α) 2

333333331

Now use α = 1 − p to get E = 1 /p. Thus, it takes an average of 1/0.107, or about 9.3 transmissions.

2. The solution is (a) 00000100 01000111 11100011 11100000 01111110 (b) 01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110 (c) 01111110 01000111 110100011 111000000 011111010 01111110 3. After stuffing, we get A B ESC ESC C ESC ESC ESC FLAG ESC FLAG D. 4. If you could always count on an endless stream of frames, one flag byte might be enough. But what if a frame ends (with a flag byte) and there are no new frames for 15 minutes. How will the receiver know that the next byte is actu- ally the start of a new frame and not just noise on the line? The protocol is much simpler with starting and ending flag bytes. 5. The output is 011110111110011111010. 6. It is possible. Suppose that the original text contains the bit sequence 01111110 as data. After bit stuffing, this sequence will be rendered as 011111010. If the second 0 is lost due to a transmission error, what is received is 01111110, which the receiver sees as end of frame. It then looks just before the end of the frame for the checksum and verifies it. If the check- sum is 16 bits, there is 1 chance in 2^16 that it will accidentally be correct, leading to an incorrect frame being accepted. The longer the checksum, the lower the probability of an error getting through undetected, but the probabil- ity is never zero. 7. If the propagation delay is very long, as in the case of a space probe on or near Mars or Venus, forward error correction is indicated. It is also appropri- ate, in a military situation in which the receiver does not want to disclose his location by transmitting. If the error rate is low enough that an error- correcting code is good enough, it may also be simpler. Finally, real-time systems cannot tolerate waiting for retransmissions. 8. Making one change to any valid character cannot generate another valid char- acter due to the nature of parity bits. Making two changes to even bits or two changes to odd bits will give another valid character, so the distance is 2. 9. Parity bits are needed at positions 1, 2, 4, 8, and 16, so messages that do not extend beyond bit 31 (including the parity bits) fit. Thus, five parity bits are sufficient. The bit pattern transmitted is 011010110011001110101 10. The encoded value is 101001001111.

17. Efficiency will be 50% when the time to transmit the frame equals the round- trip propagation delay. At a transmission rate of 4 bits/ms, 160 bits takes 40 ms. For frame sizes above 160 bits, stop-and-wait is reasonably efficient. 18. To operate efficiently, the sequence space (actually, the send window size) must be large enough to allow the transmitter to keep transmitting until the first acknowledgement has been received. The propagation time is 18 ms. At T1 speed, which is 1.536 Mbps (excluding the 1 header bit), a 64-byte frame takes 0.300 msec. Therefore, the first frame fully arrives 18.3 msec after its transmission was started. The acknowledgement takes another 18 msec to get back, plus a small (negligible) time for the acknowledgement to arrive fully. In all, this time is 36.3 msec. The transmitter must have enough window space to keep going for 36.3 msec. A frame takes 0.3 ms, so it takes 121 frames to fill the pipe. Seven-bit sequence numbers are needed. 19. It can happen. Suppose that the sender transmits a frame and a garbled acknowledgement comes back quickly. The main loop will be executed a second time and a frame will be sent while the timer is still running. 20. Let the sender’s window be ( S (^) l , Su ) and the receiver’s be ( R (^) l , R (^) u ). Let the window size be W. The relations that must hold are: 0 ≤ Su − Sl + 1 ≤ W 1 R (^) u − R (^) l + 1 = W Sl ≤ R (^) l ≤ S (^) u + 1 21. The protocol would be incorrect. Suppose that 3-bit sequence numbers are in use. Consider the following scenario: A just sent frame 7. B gets the frame and sends a piggybacked ACK. A gets the ACK and sends frames 0–6, all of which get lost. B times out and retransmits its current frame, with the ACK 7. Look at the situation at A when the frame with r.ack = 7 arrives. The key variables are AckExpected = 0, r.ack = 7, and NextFrameToSend = 7_._ The modified between would return true , causing A to think the lost frames were being acknowledged. 22. Yes. It might lead to deadlock. Suppose that a batch of frames arrived correctly and were accepted. Then the receiver would advance its window. Now suppose that all the acknowledgements were lost. The sender would eventually time out and send the first frame again. The receiver would send a NAK. Suppose that this were lost. From that point on, the sender would keep timing out and sending a frame that had already been accepted, but the receiver would just ignore it. Setting the auxiliary timer results in a correct acknowledgement being sent back eventually instead, which resynchronizes.

23. It would lead to deadlock because this is the only place that incoming acknowledgements are processed. Without this code, the sender would keep timing out and never make any progress. 24. It would defeat the purpose of having NAKs, so we would have to fall back to timeouts. Although the performance would degrade, the correctness would not be affected. The NAKs are not essential. 25. Consider the following scenario. A sends 0 to B. B gets it and sends an ACK , but the ACK gets lost. A times out and repeats 0, but now B expects 1, so it sends a NAK. If A merely re-sent r.ack+1, it would be sending frame 1, which it has not got yet. 26. No. The maximum receive window size is 1. Suppose that it were 2. Ini- tially, the sender transmits frames 0–6. All are received and acknowledged, but the acknowledgement is lost. The receiver is now prepared to accept 7 and 0. When the retransmission of 0 arrives at the receiver, it will be buf- fered and 6 acknowledged. When 7 comes in, 7 and 0 will be passed to the host, leading to a protocol failure. 27. Suppose A sent B a frame that arrived correctly, but there was no reverse traffic. After a while A would time out and retransmit. B would notice that the sequence number was incorrect, since the sequence number is below FrameExpected. Consequently, it would send a NAK , which carries an acknowledgement number. Each frame would be sent exactly two times. 28. No. This implementation fails. With MaxSeq = 4, we get NrBufs = 2_._ The even sequence numbers use buffer 0 and the odd ones use buffer 1. This mapping means that frames 4 and 0 both use the same buffer. Suppose that frames 0–3 are received and acknowledged. The receiver’s window now con- tains 4 and 0. If 4 is lost and 0 arrives, it will be put in buffer 0 and arrived [0] set to true. The loop in the code for FrameArrival will be exe- cuted once, and an out-of-order message delivered to the host. This protocol requires MaxSeq to be odd to work properly. However, other implementa- tions of sliding window protocols do not all have this property 29. Let t = 0 denote the start of transmission. At t = 1 msec, the first frame has been fully transmitted. At t = 271 msec, the first frame has fully arrived. At t = 272 msec, the frame acknowledging the first one has been fully sent. At t = 542 msec, the acknowledgement-bearing frame has fully arrived. Thus, the cycle is 542 msec. A total of k frames are sent in 542 msec, for an efficiency of k/ 542. Hence (a) k = 1, efficiency = 1/542 = 0.18% (b) k = 7, efficiency = 7/542 = 1.29% (c) k = 4, efficiency = 4/542 = 0.74%

35. The Petri net and state graph are as follows:

BD

AE

ACD

A

C

B

D

E

1

2

3

4

The system modeled is mutual exclusion. B and E are critical sections that may not be active simultaneously, i.e., state BE is not permitted. Place C represents a semaphore that can be seized by either A or D but not by both together.

36. PPP was clearly designed to be implemented in software, not in hardware as HDLC nearly always is. With a software implementation, working entirely with bytes is much simpler than working with individual bits. In addition, PPP was designed to be used with modems, and modems accept and transmit data in units of 1 byte, not 1 bit. 37. At its smallest, each frame has two flag bytes, one protocol byte, and two checksum bytes, for a total of five overhead bytes per frame.

SOLUTIONS TO CHAPTER 4 PROBLEMS

1. The formula is the standard formula for Markov queueing given in section 4.1.1, namely, T = 1 / (μ C − λ). Here C = 10 8 and μ = 10 −^4 , so T = 1 / (10000 − lambda ) sec. For the three arrival rates, we get (a) 0.1 msec, (b) 0.11 msec, (c) 1 msec. For case (c) we are operating a queueing system with ρ = λ / μ C = 0.9, which gives the 10× delay. 2. With pure ALOHA the usable bandwidth is 0.184 × 56 kbps = 10.3 kbps. Each station requires 10 bps, so N = 10300 / 10 = 1030 stations.

3. With pure ALOHA, transmission can start instantly. At low load, no colli- sions are expected so the transmission is likely to be successful. With slotted ALOHA, it has to wait for the next slot. This introduces half a slot time of delay. 4. Each terminal makes one request every 200 sec, for a total load of 50 requests/sec. Hence G = 50 / 8000 = 1 / 160_._ 5. (a) With G = 2 the Poisson law gives a probability of e −^2_._ (b) (1 − e − G^ ) k^ e − G^ = 0.135 × 0.865 k^. (c) The expected number of transmissions is e G^ = 7.. 6. (a) From the Poisson law again, P (^) 0 = e − G^ , so G = −ln P (^) 0 = −ln 0.1 = 2.. (b) Using S = Ge − G^ with G = 2.3 and e − G^ = 0.1, S = 0.. (c) Whenever G > 1 the channel is overloaded, so it is overloaded. 7. The number of transmissions is E = e G^. The E events are separated by E − 1 intervals of four slots each, so the delay is 4( e G^ − 1). The throughput is given by S = Ge − G^. Thus, we have two parametric equations, one for delay and one for throughput, both in terms of G. For each G value it is possible to find the corresponding delay and throughput, yielding one point on the curve. 8. (a) The worst case is: all stations want to send and s is the lowest numbered station. Wait time N bit contention period + ( N − 1) × d bit for transmission of frames. The total is N + ( N − 1) d bit times. (b) The worst case is: all sta- tions have frames to transmit and s has the lowest virtual station number. Consequently, s will get its turn to transmit after the other N − 1 stations have transmitted one frame each, and N contention periods of size log 2 N^ each. Wait time is thus ( N − 1) × d + N × log 2 bits. 9. When station 4 sends, it becomes 0, and 1, 2, and 3 are increased by 1. When station 3 sends, it becomes 0, and 0, 1, and 2 are increased by 1. Finally, when station 9 sends, it becomes 0 and all the other stations are incremented by 1. The result is 9, 1, 2, 6, 4, 8, 5, 7, 0, and 3. 10. Stations 2, 3, 5, 7, 11, and 13 want to send. Eleven slots are needed, with the contents of each slot being as follows: slot 1: 2, 3, 5, 7, 11, 13 slot 2: 2, 3, 5, 7 slot 3: 2, 3 slot 4: 2 slot 5: 3 slot 6: 5, 7 slot 7: 5 slot 8: 7 slot 9: 11, 13