Lecture 9 November 12, 2018 Wireless Access Graduate course in Communications Engineering University of Rome La Sapienza Rome, Italy 2018-2019
Medium Access Control Scheduled access
Classification of wireless MAC protocols Wireless MAC protocols Random access (contention) protocols Scheduled (contentionless) protocols Hybrid protocols Aloha CSMA Collision Avoidance Demand Polling Token Static assignment Random Reservation The above classification is based on how DATA traffic is transferred Most scheduled protocols, in fact, foresee a random access phase in which control packets are subject to collision
Scheduled Access Protocols Scheduled access avoids more than one terminal transmitting at a given time Data packets do not suffer from collision: at all times terminals know which terminal is allowed to transmit Good for centralized architectures, where a controller (Base Station, Access Point) manages the access Suitable as well for distributed architectures in which resource control and management is centralized Possible schemes are: Polling the controller calls one terminal at a time (see Bluetooth) On Demand Assignment the controller grants the channel to terminals following a request, typically submitted in a random access phase Static a resource (e.g. time slot, carrier) is statically assigned to a terminal when it joins the network In distributed architectures, scheduled protocols can be adopted by either promoting a terminal to act as a controller or by adopting a distributed scheduling strategy (token)
Scheduled Access A scheduled access system can be modeled as a queueing system An important issue is designing the depth of the queue Among queueing systems the M/G/1 is particularly suited to model the behaviour of a scheduled access system
Time in system vs. time in queue In the analysis of the M/M/1 system we defined the time spent in the system by a packet, called T, and evaluated its average value: E[ T ] = E [ N ] ρ = λ ( 1 ρ)λ = 1 / µ ( 1 ρ) In general, for the i-th packet such time is given by the sum of two contributions: the service time X i and the time in queue W i T i = X i + W i E T [ ] = E[ X] + E[ W ] X + W In the case of the M/M/1 system one has: E[ T ] = 1 µ ( 1 ρ) = X + W = 1 µ + ρ µ 1 ρ ( )
The Pollaczek-Khinchin (P-K) formula For the general case, the average time in queue W can be obtained by means of the Pollaczek-Khinchin (P-K) formula We will derive it in the case of a M/G/1 system, and then use it to analyze performance of scheduled access systems Call: W i waiting time of the i-th packet R i residual service time seen by the i-th packet if a j-th packet is being served when the i-th packet arrives, R i is the time before service to the j-th packet is completed if the server is idle when the i-th packet arrives R i =0 X i service time of the i-th packet N i number of packets waiting in queue when the i-th packet arrives
The Pollaczek-Khinchin (P-K) formula One has thus the following expression for the time in queue W i = R i + i 1 j=i N i By taking expectations and using the independence of the random variables N i and X i-1, X i-ni, one has: X j E[ W ] i = E R i i 1 j=i N i [ ] + E X j = Average residual time = E[ R ] i + X E[ N ] i Average service time Average number of packets in queue
By taking the limit for i Note that the limit for i behaviour The Pollaczek-Khinchin (P-K) formula + one gets: W = R + 1 µ N Q + corresponds to a long-term If now one applies Little s result to the waiting queue, one has: N Q = λw and by substitution one obtains: W = R + 1 λw = R + ρw W = R µ 1 ρ W is thus a function of ρ and of the residual service time R, which will be evaluated in the following slides
The Pollaczek-Khinchin (P-K) formula Let us consider the residual service time r(τ) at time τ We will consider a time t such that r(t)=0, and we will indicate with M(t) the number of service completions in the interval [0,t], as in figure below: 0
The Pollaczek-Khinchin (P-K) formula M ( t) One has: 1 t 1 1 r( τ )dτ = t 0 t 2 X 2 i i=1 where X i is the service time of the i-th packet One can write the above equation as: 1 t t r( τ )dτ = 1 0 2 M ( t) t M ( t) i=1 X i 2 ( ) M t and by taking the limit for t + and assuming that the limits below exist (finite value) one gets: 1 lim t + t t 0 r( τ )dτ = 1 2 lim t + M ( t) t lim t + M ( t) i=1 M t 2 X i ( )
The Pollaczek-Khinchin (P-K) formula 1 lim t + t Time average of the residual time t 0 r( τ )dτ = 1 2 lim t + M ( t) Assuming the system is in equilibrium, then the time average of the departure rate must equal the time average of the arrival rate Assuming that the process is ergodic, and thus that one can replace time averages with ensemble averages, one has: and thus: W = Time average of the departure rate R = 1 2 λ E X 2 R 1 ρ = λ E X 2 2 1 ρ ( ) t lim t + M ( t) i=1 M t 2 X i ( ) Second moment of the service time Pollaczek-Khinchin (P-K) formula for a M/G/1 system
M/G/1 queue with vacations It is useful to consider the case where a server goes on vacation for some random interval of time between two busy periods : V 1, V 2,... are the durations of the vacations taken by the server, and we will assume they are independent and identically distributed (IID) random variables V 1, V 2,... are also assumed to be independent of interarrival and service times
M/G/1 queue with vacations A new packet arriving in the system has now to wait the end of the current service OR vacation of the server As a consequence one can still write: but in this case one has: W = R 1 ρ 1 t t 0 r( τ )dτ = 1 t = 1 2 M( t) i=1 1 2 X 2 i M ( t) t M( t) i=1 + 1 t X i 2 M t L( t) 1 2 V 2 i = i=1 ( ) + 1 2 L( t) t L( t) i=1 L t V i 2 ( )
If one takes the limit for t 1 lim t + t t 0 r( τ )dτ = 1 2 lim t + and thus: R = 1 2 λe X 2 + 1 2 M/G/1 queue with vacations M ( t) t lim t + ( 1 ρ) E[ V ] E V 2 + one has in this case: M ( t) i=1 X i 2 M t ( ) + 1 2 lim t + L( t) t lim t + The result can be explained by observing that for t + the fraction of time spent serving packets approaches ρ, and thus the remaining fraction of time, spent on vacation, approaches 1-ρ One has thus: W = R 1 ρ = λ E X 2 2 1 ρ ( ) + E V 2 2E[ V ] L( t) i=1 L t (P-K) formula for a M/G/1 system with vacations V i 2 ( )
Scheduled access with reservations The M/G/1 queue with vacations is the ideal tool for modeling a scheduled access system where transmission of data packets is preceded by a reservation phase Reservation periods correspond to the vacation times Let us consider the case of m users, each one emitting packets with rate λ/m Each user introduces a reservation time before sending all the packets in its queue (exhaustive system) Users work in a cyclic order, reserving the channel and sending immediately after the data packets
Scheduled access with reservations In this case one has the following expression for the expected time in queue E[ W ] i = E[ R ] i + E [ N ] i µ + E[ Y ] i where Y i is the sum of the duration of the whole reservation periods that user i has to wait before sending its packets
Scheduled access with reservations Following the same approach as before we get in this case: W = R + 1 R + Y λw + Y = R + ρw + Y W = µ 1 ρ where, as seen before, one has: 1 R = 1 2 λe X 2 = 1 2 λe X 2 + 1 ( 2 1 ρ ) + 1 2 1 ρ R m 1 m m 1 l=0 m 1 l=0 ( ) E V 2 Y E[ V ] E V 2 l E [ V ] l The exact expression of and will depend on the statistics of the reservation time. In the following slides the derivation will be carried out for a Token Ring system. =
Token ring Token ring Nodes in the network exchange a token giving the right to use the channel Originally proposed for wired ring networks with unidirectional links: Nodes Network interfaces In the case of unidirectional wired links, a node in the ring will retransmit on its outgoing link the bits received from its incoming link, delayed by k bits (k 1), where k is the length of the token in bits
Token ring A node acquires the control of the channel by sending a busy token The busy token is followed by the bits of the packet When the node has completed transmission it releases the channel by sending a free token Busy token Data packet Free token Nodes keep on forwarding the free token until a node has a packet to send
Token ring Assuming that each node adds a propagation (and processing) delay of v the average time in queue in a token ring network can be evaluated as follows: Where in this case one has: R = 1 2 λe X 2 W = R + Y 1 ρ ( ) And Y can be shown to be in this case equal to Y = ( m 1) 2 + 1 2 1 ρ v ( ) E V 2 E[ V ] = v E[ V ] = 1 2 λe X 2 E V 2 = v 2 + 1 ( 2 1 ρ )v Delay due to reservation (token transfer) over half the ring
Token ring And thus: W = R + Y 1 ρ = λe X 2 2 1 ρ = λe X 2 2 1 ρ ( )v ( )v ( ) + 1 ρ 2( 1 ρ) + m 1 2( 1 ρ) = ( )v ( ) + m ρ 2( 1 ρ)
IEEE 802.5 standard The IEEE 802.5 standard adopted a token ring approach, with two key differences: A star topology is adopted: A node sending a packet waits to receive the acknowledgment from the destination before releasing the token
Polling Polling the controller calls one terminal at the time Controller!??! Stations Advantages: Flexibility in scheduling - different priority among nodes can be easily introduced by calling more often high priority nodes Ease of deployment - particularly simple when a centralized architecture is available, but can be done in distributed architectures as well (see Bluetooth) Drawbacks: Overhead - in the case of lightly loaded networks (when most nodes have no data) the impact of polling packets is no longer negligible Robustness - the controller is a weak point in the network, especially in centralized architectures
Polling vs. token networks Polling can be seen as an implementation of a token-based system The controller in a polling network has the role of taking the token from a node and transferring it to the next one!? Controller Token transfer Stations The need of two communications between each data transfer can lead to a large delay in token transfer compared to a token ring network, leading to a lower throughput
Hub polling and token bus The token transfer delay introduced by polling schemes can be reduced by adopting a mixed scheme called hub polling In hub polling the poll is only done at the beginning The first node then directly passes the token to the next node, without further intervention of the controller:? Controller Stations When there is no controller the network goes back to a fully distributed fashion, and goes under the name of token bus (adopted in the IEEE 802.4 standard)
Scheduled access: examples Most existing wireless systems combine scheduled and random access depending on traffic and application requirements as for example: IEEE 802.11 (Wi-Fi) Bluetooth IEEE 802.15.3 IEEE 802.15.4a
IEEE 802.11 - Point Coordination Function - The Point Coordination Function in a 802.11 network allows terminals to access the medium without contention (Contention Free or CF) The implementation of PCF is based on the presence of a Point Coordinator (typically an Access Point) that determines the access to the medium of the terminals according to a polling scheme The PCF can coexist with the a Distributed Coordination Function based on random access (CSMA-CA) In this case a CFP Repetition Period is defined The CFP Repetition Period is divided in a Contention Free Period (CFP) dedicated to contention free access based on the PCF and a Contention Period (CP) during which terminals access the medium according to the CSMA-CA protocol:
Bluetooth (IEEE 802.15.1) Bluetooth adopts a Contention Free access, based on the Master-Slave (polling) approach: T SCO ACL SCO ACL ACL SCO Master Slave #1 Slave #2 TX RX TX RX TX RX TX RX RX RX TX RX Slave #7 Time