230 likes | 368 Views
Range Trees with Variable Length Comparisons (RT-VLC). Author: Ioannis Sourdis, Ruben de Smet, and Georgi N. Gaydadjiev Publisher: 15th IEEE Workshop on High Performance Switching and Routing (HPSR), 2009 Presenter: Chin-Chung Pan Date: 2009/09/08. Outline. Introduction RT-VLC Rules
E N D
Range Trees with Variable Length Comparisons(RT-VLC) Author: Ioannis Sourdis, Ruben de Smet, and Georgi N. Gaydadjiev Publisher: 15th IEEE Workshop on High Performance Switching and Routing (HPSR), 2009 Presenter: Chin-Chung Pan Date: 2009/09/08
Outline • Introduction • RT-VLC Rules • Constructing a RT-VLC • Performance
Introduction-Range Tree L: less, E:equal, GE: greater or equal, G: greater.
Introduction-Range Tree • Range Trees avoid the length dimension performing comparisons on the expanded prefixes (full addresses). • Range Trees need to store the complete addresses to be compared at each stage and therefore consume considerable memory size.
Introduction-Range Trees with Variable Length Comparisons(RT-VLC) CP: Common Prefix, ‘-’: bit not necessary to be processed, L: less, E:equal, GE: greater or equal, G: greater.
RT-VLC Rules • The address range [Na,Nb) and divides it in k+1 subranges R1, R2, ..., Rk+1 defined by the unique addresses (of width W) Ai ∈ [Na,Nb), ∀i ∈ N, i ≤ k, such that R1 = [Na,A1), .., Ri = [Ai−1,Ai), ... Rk+1 = [Ak,Nb).
RT-VLC Rules (cont.) • Rule 1:Omit the common prefix of the node border. • Rule 2:Omit address suffix of value ’0’. • Rule 3:Share addresses’ common prefix. • Rule 4:Share addresses’ common suffix.
Rule 1:Omit the common prefix of the node border • When there is a common prefix of length L (L < W) of the node borders Na and Nb then the L most significant bits of the addresses Ai can be omitted from the comparisons at the node. Na ≦ AIN< Nb RT-VLC Node Nb Na A1 A2 00000 00011 00101 01000 (00111) --011 --101
Rule 2:Omit address suffix of value ’0’ • Ai have a suffix of length L, where L < W, that is zero. Then, this suffix of Ai does not need to be compared against the L last bits of AIN. Na ≦ AIN< Nb RT-VLC Node Nb Na A1 A2 00100 01010 001-- 0101-
Rule 3:Share addresses’ common prefix • The Common Prefix ACPi of the addresses Ai of length L (L < W) can be shared among concurrent comparisons and processed separately. Na ≦ AIN< Nb 1110- G E 11100 11101 L ----1 L GE L GE L GE Nb Na A1 A2
Rule 4:Share addresses’ common suffix • The common suffix ACSi of the addresses Ai, of length L (L < W) can be shared among concurrent comparisons and processed separately 011-- 110-- Na ≦ AIN< Nb G L E E G L ---01 01101 11001 L GE L GE L GE Nb Na A1 A2
Constructing a RT-VLC • Top-Down Heuristic • Bottom-Up Heuristic
Constructing a RT-VLC - Top-Down Heuristic
Constructing a RT-VLC - Top-Down Heuristic A1 00110 A2 01000 A3 01010 A4 01100 A5 10000 A6 11100 A7 11101 A100110 A201000 A301010 A401100 A510000 A611100 A711101 A’1 00--- A’2 01--- A’5 10--- A’6 11--- 01--- 1---- --11- --01- --10- -1100 CP: -110- -1101 ----1 R1 R2 R3 R4 R5 R6 R7 R6
Constructing a RT-VLC - Top-Down Heuristic Step1:Apply the RT-VLC rules 1 and 2. Step2:Select a comparator length that maximizes the possible number of branches, i.e., 8-bits. Step3:Consider all addresses in the set to be processed with the above comparison length. Omit address suffixes that cannot be compared assuming they are equal to zero. Step4:Based on the above create the defined from the comparisons groups/intervals.
Constructing a RT-VLC - Top-Down Heuristic Step5:If necessary merge neighboring groups until the number of comparisons are reduced to the available comparator resources. Step6:Recursively repeat for the created children nodes. Step7:Terminate when each node branch points to a single address range.
Constructing a RT-VLC - Bottom-Up Heuristic
Constructing a RT-VLC - Bottom-Up Heuristic Na 00000 A1 00110 A2 01000 A3 01010 A4 01100 A5 10000 A6 11100 A7 11101 Nb 11111 01--- 1---- CP:-1100 --11- --01- --10- -1100 -1101 -1101 A1 00110 A2 01000 A3 01010 A4 01100 A5 10000 A6 11100 A7 11101 Nb Na N’a 00000 N’a 01000 N’b 01000 N’a 10000 N’b 10000 N’b 11111
Constructing a RT-VLC - Bottom-Up Heuristic Step1:Select the first b addresses Ai > Na (where Na initially is 0) that can be compared in one node after applying the RT-VLC rules (e.g., addresses Ai,Ai+1, ...Ab). Step2:Set node’s upper bound Nb a point in the address space where Nb < Ab+1 that Na has a long suffix of 0’s2. The resulted node maps to an address range [Na,Nb). Step3:Repeat the above starting from the upper bound of the previous group (Nnewa = Nprevb ) until all addresses Ai in the address space are grouped.
Constructing a RT-VLC - Bottom-Up Heuristic Step4:Recursively repeat the above steps for the next upper tree level L−1 using as new set of addresses AL−1i the borders NLi of the previous level. Step5:Terminate when all addresses in the list are processed in a single (root) node.