Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
King Fahd University of Petroleum & Minerals Computer Engineering Dept COE 541 – Design and Analysis of Local Area Networks Term 071 Dr. Ashraf S. Hasan Mahmoud Rm 22-144 Ext. 1724 Email: [email protected] 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 1 Random Access Network: • Random access network is characterized by the absence of access control mechanism. A station can transmit at a time (arbitrary) but it can not determine if another station is transmitting at nearly the same time. •Pure ALOHA: a station can transmit at any time (collision interval) is 2 Δt, where Δt is the one way propagation delay. •Slotted ALOHA (S-ALOHA): (refinement from pure aloha) all stations must be synchronized to transmit in the beginning of a time slot, all packets have the same length, and then there is a decrease in the collision interval to Δt : “Packets may collide completely or not at all” 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 2 Random Access Network: Under light load, a user can access the network after a reasonable waiting time. No central control, a station can be added deleted easily. Network has some good fault tolerance. S-Aloha is not appropriate for networks for which there is long propagation delay like radio or satellite networks. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 3 Random Access Network: Other networks with shorter propagation delay are benefiting from this strategy. •In this case, a station can listen (carrier sensing) to medium (CSMA) and transmits if medium is not busy. •CSMA is useless for network for which the propagation delay is greater than the packet transmission time like radio or satellite network (useful only when propagation delay is a small fraction of packet transmission time). 5/25/2017 CSMA is useful if propagation delay << packet transmission time. Carrier sense reduces the length of collision Dr. Ashraf S. Hasan Mahmoud intervals. 4 Random Access Network: •CSMA/CD: Listen (for 2 Δt) while transmitting if collision is detected then stop immediately (corrupted transmission can be easily detected) and transmit a jamming signal. •Collision detection gives performance to CSMA/CD than CSMA. However, CSMA/CD are difficult to analyze for the delay. But for Slotted ALOHA (class of random access) a delay analyze is possible. •This is comparable to non-persistent CSMA/CD in terms of general efforts on performance. •Also stability analysis is taken for slotted ALOHA too. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 5 Architecture •BUS: Baseband. Passive network. Both directions (Coax/TP/FO) from station. Prevent reflection. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 6 Architecture •Tree: Broadband: Active repeaters. Directional transmission (repeaters). EX: CATV. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 7 Architecture Major difference: baseband propagation delays << broadband delays (due to directional transmission) This chapter is on baseband network. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 8 Random Access Network (Example) •Signal propagation over a 500 m Coax/TP where signal propagate at a speed of 0.65*C (C= 3*108 m/s) or 5 µs/Km. •The Number of bits transmitted before a collision is detected: •Ncoll = 2*L*5 µs/Km*R b/µs. •R= 1Gbps or 103 b/µs. •Ncoll = 2*0.5 Km*5 µs/Km *103 b/µs= 5 Kbits. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 9 Random Access Network (Example) 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 10 The Slotted ALOHA (S-ALOHA): •S-ALOHA can be used for LAN even if it was designed for station channels. •Time is segmented into Δt, where Δt=X/R is the packet transmission time. •Every packet transmitted must fit in a Δt interval. •Stations must delay transmission until beginning of a Δt. •We assume a bus medium. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 11 The Slotted ALOHA (S-ALOHA): •State (station): •transmitting :( a packet is trans. In Δt= ). •Backoff: (results from a collision where a station selects each with a probability of , then back off time is ) •After a time equal to two ways propagation delay the sender receives an ACK (on a separate channel) indicating no collision. •If there is a collision, no ACK will be received after the two way propagation delay, the station decides to back-off and select a new integer i. •The procedure is repeated as needed until successful transmission. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 12 Throughput of S-ALOHA for an infinite Population Consider an infinite population (∞ # of stations) which is a good approximate for finite population case. Assume Poisson arrivals with: S (Throughput): avg. # of successful trans. / G (Offered load): avg. # of Attempts / Smax = 1/e 5/25/2017 0.368 for G=1. Dr. Ashraf S. Hasan Mahmoud 13 Throughput of S-ALOHA for an infinite Population 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 14 Throughput of S-ALOHA for finite Population: Assume: •M independent stations that are using S-ALOHA. •Transmissions form a sequence of independent Bernoulli trials. •All transmissions originate from one arrival process. •Do not account for delays due to backoff because of collisions. •From probability theory: M independent Bernoulli, each with G/M arrivals, approaches a Poisson Distribution. With parameter: G as M 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 15 Throughput of S-ALOHA for finite Population: For station # i Let: Probability of a station i successfully transmits is: 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 16 Throughput of S-ALOHA for finite Population: If all station shares the load: Si = S/M and Gi=G/M which gives: (network throughput Snet=N*Sst). Since then This is similar to the previous results of large value of M. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 17 Throughput of S-ALOHA for finite Population: we may evaluate the maximum throughput Smax by differentiating S w.r.t. G: which gives Smax for G=1 (in each slot one station is trying). Thus, which evaluate as follows: Notice that: Smax decreases as M increases ( ). Therefore, Smax= 0.368 is a good approximation for M>20. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 18 Delay Analysis of S-ALOHA): •S-ALOHA provides an approximate analysis. •Analysis assumes that: •New and collided packets come from the same process. •Newly and retransmitted packets are separate variables. •This will give better accuracy than 5/25/2017 Dr. Ashraf S. Hasan Mahmoud : 19 Delay Analysis of S-ALOHA): Process Assumptions: •Infinite population •New Arrivals to the network: Poisson distribution with avg. rate S packets/slot or λ packet /s where S=λ* •Total arrivals of the process (new and retransmitted) have Poisson distribution with G packets/slot. •Stations have always one packet ready for transmission (new and retransmitted). •Bus end to end propagation delay is τ seconds. •A station knows about its successful transmission after waiting for a time of r slots( ) following the transmission of a packet in . 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 20 Delay Analysis of S-ALOHA): 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 21 Delay Analysis of S-ALOHA): Time to transmit a packet (assume 1 retransmission): The total transfer delay is: 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 22 Delay Analysis of S-ALOHA): Evaluation of the number of retransmissions: Assume: •qn: is the probability of a successful transmission for a new packet. •qt: is the probability of a successful transmission for a retransmitted packet. •The probability (Pi) that a packet takes i attempts to transmit is: Where: 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 23 Delay Analysis of S-ALOHA): The average number of retransmissions is: Therefore, Thus the transfer delay is: The normalized transfer delay is: where 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 24 Delay Analysis of S-ALOHA): •The probabilities qn and qt are determined in the Appendix: III- Notice that: 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 25 Delay Analysis of S-ALOHA): Since S/G (ratio of # of success/ # of attempts) is the probability of successful transmission. the G/S is the avg. # of times a packet is retransmitted until success: 1+h = G/S, we have Then However, using reduced to 5/25/2017 (III). (more accurate than ) implies . Dr. Ashraf S. Hasan Mahmoud 26 Delay Analysis of S-ALOHA): Equations I,II and III are non-linear and transcendental equations. Since it is difficult to eliminate , we may have a numerical solution as follows: and use Where as function of G and K only, we obtain: IV and Steps: Solve IV for S(G,k) 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 27 Delay Analysis of S-ALOHA): 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 28 Delay Analysis of S-ALOHA): 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 29 Delay Analysis of S-ALOHA): Average number of back logged stations: •The backlogged delay is similar to queuing delay. •Using little law: •The arrival rate is packet /s (normalized –input rate = output rate-). where (n ≤ m) , is the avg. time a station is in the backlog state (waiting) and is 2-way prop. Delay. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 30 Delay Analysis of S-ALOHA): We can plot n as a function of S for values of K. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 31 Stability Consideration We notice the relationship (G => S => => h). •In G => S each value of S has 2 values for G. •In S => each value of S has 2 values for •This contradiction is explained by using the stability consideration for ALOHA. •Under statistical Equilibrium the major issues are M (# of Stations) and the avg. backlogged time which determine the stability. •The infinite population is adequate model for finite population behavior when M is large enough (M > 20). 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 32 Stability Consideration •Only under equilibrium we have •Thus S must be the normalized throughput that is equal to normalized input rate. •Consider a finite (M station) with n # of them in the backlogged state, then: •M-n stations can generate packets. •σ probability of a free station generates a packet. •The total input rate (load line) with negative slope = 5/25/2017 => straight line . Dr. Ashraf S. Hasan Mahmoud 33 Stability Consideration Network is: •Stable: if the load line intersects (non-tangentially) to throughput in one and only one point (otherwise channel is unstable). •Stable Equilibrium: it remains at or at about that point for a finite period of time. •Globally stable: if this point is the only stable equilibrium point. •Locally stable: there more than one stable equilibrium point. each is locally stable. •Unstable: operation immediately drift away from the point. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 34 Stability Consideration 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 35 Stability Consideration •For Case a: •Move left from P => n . since load >throughput =>n => back to P. •Move Right from P => n . since load < throughput =>n => back to P. •P is locally stable. Since there is only one intersection => stable network. •For Case b: •P1: Same as P in Case a. P1 is locally stable. •P2: •Move left from P2 => n . since load < throughput => n => drift away from P2. •Move Rig. from P2 =>n . since load > throughput => n => drift away from P2. P2 is unstable. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 36 Stability Consideration •For Case b (cont.) •P3: •Same as P in Case a. P3 is locally stable. •For Case c: •Same as P in Case a. Q is locally stable. Since there is only one intersection => stable network but overloaded. •For Case d: •Q1: •Same as P in Case a. Q1 is locally stable. •Q2: •Same as P2 in Case b. Q2 is unstable. =>Unstable network. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 37 Stabilizing the network: •The network is bi-stable (3- intersections) for Backoff=K1. •Increase from K1 to K2 => the only intersection is Q1.=> Stable network however throughput is decreased (P1->Q1) and backlog increased and so for the delay. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 38 CSMA Non-persistent CSMA (NP): If channel is sensed idle then transmit packet Else (channel busy) use backoff algorithm to delay transmission. 1-persistent CSMA (p-persistent and P=1): If channel is sensed idle then transmit packet Else (channel busy) keep spin sensing until channel is ideal in which case repeat the algorithm. p-persistent CSMA (NP): If channel is sensed idle then Transmit packet with probability of p. Else Wait for end to end delay (time slot) with probability (1-p) & repeat. Else (channel busy) keep spin sensing until channel is idle in which case repeat the algorithm. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 39 Flow diagram of CSMA. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 40 Throughput Analysis CSMA Assumption for throughput analysis: •Infinite # of station, arrivals are following possion distribution. •Propagation delay between stations is τ. That is the one –way propagation delay for bus. •Fixed packet length and transmission time is Δt. •Each ST has at most one packet ready for transmission •In the case of slotted protocols Δt = k τ. Where k is integer. •No overhead for sensing, channel is noiseless. •Any packet time overlap is destructive. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 41 Throughput Analysis CSMA Throughput Analysis CSMA ST may transmit No. Stations may transmit ST t t t t t t P1 ST1 t Y Pk Assume Last Attempt t1(Time where ST senses medium & free) STk t Y t t y t t y t z STk Heard by all Busy Period B Idle 1 Cycle Throughput Analysis CSMA U S BI B Includes both U and another (1) U t * e G t ( t ) K e t G , t P(k arrival in 0,t) = K! t G G 0 ( t ) ( ) e P(0 arrival in ) = t 0! U t * Prob( o arrival in ) G ( U t * e t ) Throughput Analysis CSMA Random Variable (2) B t Y First moment B t y CDF Fy (y) = Prob (Y y) For y, no arrival in period(t+) 0 Fy ( y ) e y G ( y ) t Py (y) = Prob (Y > y) =1 – Fy (y) = 1 e G ( y ) t 0 arrival in -y Throughput Analysis CSMA y y (1 e G ( y ) t 0 t y (1 e G )dy G . t ) Throughput Analysis CSMA (3) I End of bzi interval Connected prob of arrival + Arrival rate G t Arrival Rate t G Inter-Arrival Rate (Reciprocal) Shrink to t y 0 0 No collisions On Average time wait for its equal to interarrival Collisions Throughput Analysis CSMA I S t G G ( y ) t t.e G . t t t ( (1 e t )) G G Multiplying and Dividing by G t G . t G.e S G . 2 G (1 ) e t ) t 0 , S = G/G+1 0 & G >>1, S=1 Throughput Analysis CSMA Notes: As a become small S=> limit of carrier sensing. S=1 can be achieved for G=∞. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 49 Throughput Analysis CSMA 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 50 Throughput Analysis CSMA Notes: For small G the persistent CSMA is the best. For large G the non persistent CSMA is the best. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 51 Throughput Analysis CSMA 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 52 Throughput Analysis CSMA Notes: •ALOHA protocols are not sensitive to varying (a) since it does not depend on it (constant). •1-persistant (slotted/un-slotted) are not sensitive to varying (a) for small (a). however, as (a) increases the sensitivity increases as well-this goes for non-persistent also-. •For large (a) ALOHA gives highest S because sensing became useless as 2τ is very large. •p-persistent performance is between S-NP & NP. ppersistent is optimized for a given (a) 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 53 Stability of CSMA •Stability of CSMA is very comparable to that of S-Aloha for a=0.01. •CSMA with M<103 with proper backoff provides excellent stability in performance. •For each value of S, (a) is optimized w.r.t. mean backoff time. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 54 Avg. Normalized Delay VS Throughput 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 55 Flow chart of CSMA/CD: 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 56 Timing diagram of CSMA /CD: Notes: Time during which channel is idle as seen by each station is : Where J is jamming time 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 57 Performance Analysis CSMA/CD 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 58 Performance Analysis CSMA/CD Notes: •γ is normalized Jamming time (in plot γ=1). •SNP is better for low value of (a) (slotted is good for high G). •Slotting time has negligible effect for low G. 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 59 Performance Analysis CSMA/CD 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 60 Performance Analysis CSMA/CD 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 61 Performance Analysis CSMA/CD 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 62 Performance Analysis CSMA/CD 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 63 Performance Analysis CSMA/CD 5/25/2017 Dr. Ashraf S. Hasan Mahmoud 64