340 likes | 346 Views
Discusses the need for PNC to provide requested latency in channel time allocation, addressing QoS needs. Explains worst-case scenario analysis and suggests improvements in stream creation requests.
E N D
Project: IEEE 802.15 Working Group for Wireless Personal Area Networks (WPANs) Submission Title: [Argument for PNC Controlled Latency] Date Submitted: [November 13, 2004] Source: [John Sarallo] Company [Appairent] Address [150 Lucius Gordon Drive, West Henrietta, NY 14586] Voice:[+1 585 727-2014], FAX: [+1 585 214-2461], E-Mail:[sarallo@appairent.com] Re: [15-04-0610-00-003b] Abstract: [Describes why the PNC should provide a requested latency when granting channel time] Purpose: [A presentation to add information to the discussion of whether 802.15.3 stream creationrequests should be time based or based on QoS needs. This document argues that latency should be provided by the PNC and that this can be done using the existing Channel Time Request command.] Notice: This document has been prepared to assist the IEEE 802.15. It is offered as a basis for discussion and is not binding on the contributing individual(s) or organization(s). The material in this document is subject to change in form and content after further study. The contributor(s) reserve(s) the right to add, amend or withdraw material contained herein. Release: The contributor acknowledges and accepts that this contribution becomes the property of IEEE and may be made publicly available by 802.15. John Sarallo, Appairent
Channel Time Request Example • Assume a Superframe Duration of 10ms • Assume a DEV is granted 2.5ms of channel time per superframe with a Superrate Rate Factor of 5 (Five 500µsCTAs per superframe) • The 802.15.3 standard states “If multiple CTAs per superframe were requested by the DEV in the Channel Time Request command, as described in 7.5.6.1, the PNC shall attempt to spread the CTAs out evenly within the superframe.” • What is the worst case time between any two consecutive CTAs if this above request is granted? John Sarallo, Appairent
Best Possible Answer • Those unfamiliar with the details of the 802.15.3 MAC may assume CTAs are perfectly distributed throughout the 10ms Superframe, arriving once every 2.0ms, with maximum inter-CTA spacing of 1.5ms • Those familiar with the details of the 802.15.3 MAC know this is not possible because… 1.5ms 0 5 10ms Superframe John Sarallo, Appairent
802.15.3 Superframe Structure • A Superframe contains a Beacon and a variable sized Contention Access Period (CAP) • CTAs are actually distributed throughout the Channel Time Allocation Period (CTAP) only John Sarallo, Appairent
Real Answer? • For simplicity, let us assume that the Beacon and the CAP consume 2ms of the 10ms Superframe • When we distribute the 5 CTAs in this superframe, the worst case time between any two consecutive CTAs is now 2.0ms 2.0ms BCN CAP 0 5 10ms CTAP Superframe John Sarallo, Appairent
But the CTAP is Shared • What if another stream existed when the request was granted (or more interestingly, created after) • If the PNC chose the above distribution of CTAs, the worst case time between any two consecutive blue CTAs is now 5.0ms 2.0ms 3.0ms BCN CAP 0 5 10ms CTAP Superframe John Sarallo, Appairent
Worst Case Scenario • The time is available and granted by the PNC, but only as one contiguous block of time. • The worst case time between consecutive CTAs is the Superframe Duration minus the total time requested per superframe. In this case 10ms – 2.5ms = 7.5ms (5x worse than expected?) 4.0ms 3.5ms BCN CAP 0 5 10ms CTAP Superframe John Sarallo, Appairent
Observations • If the PNC grants requests based solely on the time requested, and merely “attempts” to spread the CTAs evenly within the superframe, the requesting DEV may not receive the latency (the maximum inter-CTA spacing) that it requires. • The DEV can only determine the actual latency received once the CTAs arrive in the Beacon. • The DEV must then monitor the CTAs to detect changes in the current latency received. John Sarallo, Appairent
What if ? • What if the PNC granted requests based on both the time requested and a requested inter-CTA spacing? • The PNC would directly maintain the inter-CTA spacing of streams. • The PNC would determine Subrate/Superate requirements based on inter-CTA spacing needs and the current Superframe Duration. • The PNC could deny future stream requests if granting the request would violate the inter-CTA spacing needs of existing streams. • Each DEV would still be responsible for maintaining other QoS parameters such as throughput. John Sarallo, Appairent
How ? • The best solution would be to add a specific inter-CTA spacing (or latency) value to the channel time request, but this would require a change to the over-air command. • Alternatively, the PNC could interpret the CTA Rate Type and CTA Rate Factor as an actual inter-CTA spacing value using the current Superframe Duration as a reference. John Sarallo, Appairent
DEV Procedure • After determining the amount of time needed per superframe and the desired inter-CTA spacing, the DEV would decide if it needs to ask for a Subrate or a Superrate Channel Time Request. To do this, it compares the maximum inter-CTA spacing required to the following value: (2 * SuperframeDuration) – TimeRequested If the maximum inter-CTA spacing required is less than the computed value, then a Superrate request is required. If the maximum inter-CTA spacing required is equal to or greater than the computed value, then a Subrate request is required. John Sarallo, Appairent
DEV Procedure (Cont.) • If a Superrate request is required, the DEV calculates the required CTA Rate Factor using the formula: SuperrateFactor = (SuperframeDuration – TimeRequested) / MaxCTASpacing The result is rounded up to the next integer value. If a Subrate request is required, the DEV calculates the required CTA Rate Factor using the formula:SubrateFactor = (MaxCTASpacing + TimeRequested) / SuperframeDuration The result is rounded down to the next power of 2. John Sarallo, Appairent
PNC Procedure • When the PNC receives a Superrate Channel Time Request, it calculates the maximum inter-CTA spacing required using using the formula: MaxCTASpacing= (SuperframeDuration – TimeRequested) / SuperrateFactor If a Subrate Channel Time Request is received, the PNC calculates the maximum inter-CTA spacing required using the formula: MaxCTASpacing= (SuperframeDuration * SubrateFactor) - TimeRequested John Sarallo, Appairent
PNC Procedure (Cont.) • The PNC grants the channel time request if the requested time per superframe is available AND if the CTAs can be allocated in such a way that the requested maximum inter-CTA spacing and minimum TU size can be provided without disrupting the inter-CTA spacing and minimum TU size of existing streams. John Sarallo, Appairent
Example 1 • Assume the superframe structure below with an existing 4ms stream that has a 6ms maximum inter-CTA requirement and a minumum TU size of 2ms BCN CAP 10ms 0 5 CTAP Superframe John Sarallo, Appairent
Example 1 (Cont.) • Assume a DEV requests 2.0ms of channel time with a maximum inter-CTA spacing of 2.0ms and a minimum TU size of 0.5ms. • First, the DEV determines if it needs to ask for a Subrate or a Superrate channel time request: (2 * SuperframeDuration) – TimeRequested = (2 * 10ms) – 2ms = 18ms. • The maximum inter-CTA spacing required (2ms) is less than 18ms so a Superrate request is required. • The DEV then calculates a Superrate Factor : SuperrateFactor = (SuperframeDuration – TimeRequested) / MaxCTASpacing = (10ms – 2ms) / 2 ms = 8ms / 2ms = 4 John Sarallo, Appairent
Example 1 (Cont.) • When the PNC receives the Superrate Channel Time Request from the DEV, it calculates the desired maximum inter-CTA spacing using using the formula: MaxCTASpacing= (SuperframeDuration – TimeRequested) / SuperrateFactor = (10ms – 2ms) / 4 = 8ms / 4 = 2ms • The PNC would only grant the request if it could provide both the 2ms of time per superframe and the calculated maximum inter-CTA spacing of 2ms without disrupting the inter-CTA spacing or minimum TU size of the existing stream. John Sarallo, Appairent
Example 1 (Cont.) • There is a CTA allocation possible that can satisfy the needs of both streams so the new request is granted. • Note that the PNC automatically increased the superrate factor for the existing stream in order to grant the request. Time / Inter-CTA / Min TU 4ms / 6ms / 2.0ms 4ms / 2ms / 0.5ms BCN CAP 0 5 10ms CTAP Superframe John Sarallo, Appairent
Example 2 • Assume the superframe structure below with an existing 4ms stream with a 3ms maximum inter-CTA requirement and a minimum TU size of 2ms. BCN CAP 0 5 10ms CTAP Superframe John Sarallo, Appairent
Example 2 (Cont.) • Assume a DEV desires 4.0ms of channel time with a maximum inter-CTA spacing of 2.0ms and a minimum TU size of 1ms. • The DEV determines if it needs to ask for a Subrate or a Superrate channel time request: (2 * SuperframeDuration) – TimeRequested = (2 * 10ms) – 4ms = 16ms. • The maximum inter-CTA spacing (2ms) is less than 16ms so a Superrate request is required. • The DEV then calculates a Superrate Factor : SuperrateFactor = (SuperframeDuration – TimeRequested) / MaxCTASpacing = (10ms – 4ms) / 2 ms = 6ms / 2ms = 3 John Sarallo, Appairent
Example 2 (Cont.) • When the PNC receives the Superrate Channel Time Request from the DEV, it calculates the desired maximum inter-CTA spacing using using the formula: MaxCTASpacing= (SuperframeDuration – TimeRequested) / SuperrateFactor = (10ms – 4ms) / 3 = 6ms / 3 = 2ms • The PNC would only grant the request if it could provide both the 4ms of time per superframe and the calculated maximum inter-CTA spacing of 2ms without disrupting the inter-CTA spacing or minimum TU size of the existing stream. John Sarallo, Appairent
Example 2 (Cont.) • The 4ms of time is available but there is no possible CTA allocation that preserves the inter-CTA spacing and minimum TU size of both streams. Therefore, the new request is denied. Time / Inter-CTA / Min TU 4ms / 3ms / 2.0ms 4ms / 2ms / 1.0ms 2.0ms 2.0ms BCN CAP 3.0ms 1.0ms BCN CAP 0 5 10ms CTAP Superframe John Sarallo, Appairent
Example 3 • Assume the superframe structure below and an existing 4ms stream with a 3ms maximum inter-CTA requirement. BCN CAP 0 5 10ms CTAP Superframe John Sarallo, Appairent
Example 3 (Cont.) • Assume a DEV desires 1.0ms of channel with a maximum inter-CTA spacing of 50.0ms. • The DEV determines if it needs to ask for a Subrate or a Superrate channel time request: (2 * SuperframeDuration) – TimeRequested = (2 * 10ms) – 1ms = 19ms. • The maximum inter-CTA spacing is greater than 19ms so a Subrate request is required. • The DEV then calculates a Subrate Factor : SubrateFactor = (MaxCTASpacing + TimeRequested) / SuperframeDuration= (50ms + 1ms) / 10 ms = 51ms / 10ms = 5.1 = 4 John Sarallo, Appairent
Example 3 (Cont.) • When the PNC receives the Subrate Channel Time Request from the DEV, it can be assured that the Subrate Factor requested will meet or beat the desired maximum inter-CTA spacing. MaxCTASpacing= (SuperframeDuration * SubrateFactor) - TimeRequested = (10ms * 4) - 1ms = 40ms – 1ms = 39ms • Note that the calculated inter-CTA spacing is less than the original requirement of 50ms. • The PNC would grant the request if it could provide the requested 1ms of time every 4th superframe without disrupting the inter-CTA spacing or minimum TU size of the existing stream. John Sarallo, Appairent
Example 3 (Cont.) • There is a CTA allocation possible that can satisfy the needs of both streams so the new request is granted. SF n 0 5 10ms SF n+1 0 5 10ms SF n+2 0 5 10ms SF n+3 0 5 10ms SF n+4 0 5 10ms John Sarallo, Appairent
Benefits of Proposal • PNC can make more intelligent decisions about which stream requests to grant or deny. • PNC could maintain the inter-CTA spacing (pseudo-latency) requirements for granted streams. • DEVs can count on receiving the inter-CTA spacing that they requested throughout the life of the stream. • PNC allocates CTAs in a manner that applications such as 1394 expect. • PNC has the information it needs to perform an intelligent re-allocation of CTAs if a change in the superframe duration is required. John Sarallo, Appairent
Drawbacks of Proposal • The granularity of the maximum inter-CTA spacing that can be requested by a DEV is limited, especially for Subrate requests. • For example, with a superframe duration of 10ms and a time request of 2ms, the different maximum inter-CTA spacings that can be requested using CTA Rate Type and Factor are shown below: RateTypeRateFactorInterCTASpace(ms)Delta(ms) Superrate 8 1.000 Superrate 7 1.143 .143Superrate 6 1.333 .190Superrate 5 1.600 .270Superrate 4 2.000 .400Superrate 3 2.667 .667 Superrate 2 4.000 1.333Superrate 1 8.000 4.000Subrate 2 18.000 10.000Subrate 4 38.000 20.000Subrate 8 78.000 40.000 John Sarallo, Appairent
Drawbacks (Cont.) • Would this be a change to the interpretation of existing fields in the Channel Time Request command, or was this the intention of Superrate and Subrate requests all along? • There is no mechanism for the PNC to inform a DEV about the inter-CTA spacing it could have provided. John Sarallo, Appairent
Conclusion • If the PNC only attempts to distribute requested CTAs evenly within a superframe without clear latency requirements, applications must understand that the latency received may be much higher than expected and that the received latency may change at any time. • With latency requirements, the PNC can allocate and maintain the requested latency for each stream. • With latency requirements, the PNC can deny new streams if granting the stream will violate the latency requirements of existing streams . • The CTA Rate Type and CTA Rate Factor can be used to convey latency information to the PNC. John Sarallo, Appairent
Additional Slides • The following slides provide information about how the presented formulas were determined. John Sarallo, Appairent
Formula for SuperrateFactor • For a perfect CTA distribution within a repeating time period the calculation of the time between CTAs is: InterCTASpacing = (SuperframeDuration – TotalTimeRequested) / SuperrateFactor • Rearranging: SuperrateFactor = (SuperframeDuration – TotalTimeRequested) /InterCTASpacing 1.5ms 0 5 10ms John Sarallo, Appairent
Formula for SubrateFactor • For a subrate distribution the time between CTAs is: InterCTASpacing = (SuperframeDuration – TotalTimeRequested) + ((SubrateFactor – 1) * SuperframeDuration) = SuperframeDuration – TotalTimeRequested + (SubrateFactor * SuperframeDuration) – SuperframeDuration = (SubrateFactor * SuperframeDuration) – TotalTimeRequested • Rearranging: SubrateFactor = (InterCTASpacing + TotalTimeRequested)/SuperframeDuration 0 5 10ms 0 5 10ms 0 5 10ms John Sarallo, Appairent
Formula for Determining Superrate vs. Subrate • For a subrate to be useful, the CTA must be able to arrive at most once every other superframe (a Subrate Factor of 2) • The minimum InterCTASpacing required for a Subrate to be useful is therefore determined by using 2 as the Subrate Factor in the formula for determining Subrate InterCTASpacing: InterCTASpacing = (SubrateFactor * SuperframeDuration) – TotalTimeRequested InterCTASpacing = (2 * SuperframeDuration) – TimeRequested 0 5 10ms 0 5 10ms 0 5 10ms John Sarallo, Appairent