The CPBT: A Method for Searching the Prefixes Using Coded Prefixes in B-Tree Author: Mohammad Behdadfar and Hossein Saidi Publisher: LNCS 2008 Presenter:

Slides:



Advertisements
Similar presentations
Network Algorithms, Lecture 4: Longest Matching Prefix Lookups George Varghese.
Advertisements

An On-Chip IP Address Lookup Algorithm Author: Xuehong Sun and Yiqiang Q. Zhao Publisher: IEEE TRANSACTIONS ON COMPUTERS, 2005 Presenter: Yu Hao, Tseng.
A Fast and Memory Efficient Dynamic IP Lookup Algorithm Based on B-Tree Author:Yeim-Kuan Chang and Yung-Chieh Lin Publisher: 2009 International Conference.
Advanced Database Discussion B Trees. Motivation for B-Trees So far we have assumed that we can store an entire data structure in main memory What if.
B+-Trees (PART 1) What is a B+ tree? Why B+ trees? Searching a B+ tree
Constant-Time LCA Retrieval
Advanced Algorithm Design and Analysis (Lecture 4) SW5 fall 2004 Simonas Šaltenis E1-215b
Digital Search Trees & Binary Tries Analog of radix sort to searching. Keys are binary bit strings.  Fixed length – 0110, 0010, 1010,  Variable.
1 Author: Ioannis Sourdis, Sri Harsha Katamaneni Publisher: IEEE ASAP,2011 Presenter: Jia-Wei Yo Date: 2011/11/16 Longest prefix Match and Updates in Range.
Processing Data in External Storage CS Data Structures Mehmet H Gunes Modified from authors’ slides.
IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS.
1 A Tree Based Router Search Engine Architecture With Single Port Memories Author: Baboescu, F.Baboescu, F. Tullsen, D.M. Rosu, G. Singh, S. Tullsen, D.M.Rosu,
Digital Search Trees & Binary Tries Analog of radix sort to searching. Keys are binary bit strings.  Fixed length – 0110, 0010, 1010,  Variable.
Efficient Multidimensional Packet Classification with Fast Updates Author: Yeim-Kuan Chang Publisher: IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL.
1 Geometric Solutions for the IP-Lookup and Packet Classification Problem (Lecture 12: The IP-LookUp & Packet Classification Problem, Part II) Advanced.
B-Trees Disk Storage What is a multiway tree? What is a B-tree?
Study of IP address lookup Schemes
©Silberschatz, Korth and Sudarshan12.1Database System Concepts Chapter 12: Part B Part A:  Index Definition in SQL  Ordered Indices  Index Sequential.
An Efficient IP Lookup Architecture with Fast Update Using Single-Match TCAMs Author: Jinsoo Kim, Junghwan Kim Publisher: WWIC 2008 Presenter: Chen-Yu.
Self-Balancing Search Trees Chapter 11. Chapter 11: Self-Balancing Search Trees2 Chapter Objectives To understand the impact that balance has on the performance.
Basic Data Structures for IP lookups and Packet Classification
B + -Trees (Part 1) Lecture 20 COMP171 Fall 2006.
Fall 2007CS 2251 Self-Balancing Search Trees Chapter 9.
1 B-Trees Disk Storage What is a multiway tree? What is a B-tree? Why B-trees? Comparing B-trees and AVL-trees Searching a B-tree Insertion in a B-tree.
B + -Trees (Part 1). Motivation AVL tree with N nodes is an excellent data structure for searching, indexing, etc. –The Big-Oh analysis shows most operations.
Self-Balancing Search Trees Chapter 11. Chapter Objectives  To understand the impact that balance has on the performance of binary search trees  To.
B + -Trees (Part 1) COMP171. Slide 2 Main and secondary memories  Secondary storage device is much, much slower than the main RAM  Pages and blocks.
General Trees and Variants CPSC 335. General Trees and transformation to binary trees B-tree variants: B*, B+, prefix B+ 2-4, Horizontal-vertical, Red-black.
B-Trees and B+-Trees Disk Storage What is a multiway tree?
Fast binary and multiway prefix searches for pachet forwarding Author: Yeim-Kuan Chang Publisher: COMPUTER NETWORKS, Volume 51, Issue 3, pp , February.
B + -Trees COMP171 Fall AVL Trees / Slide 2 Dictionary for Secondary storage * The AVL tree is an excellent dictionary structure when the entire.
Address Lookup in IP Routers. 2 Routing Table Lookup Routing Decision Forwarding Decision Forwarding Decision Routing Table Routing Table Routing Table.
Randomized Algorithms - Treaps
1 Efficient packet classification using TCAMs Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present: Chen-Yu Lin Date:
ICS 220 – Data Structures and Algorithms Week 7 Dr. Ken Cosh.
ALGORITHMS FOR ISNE DR. KENNETH COSH WEEK 6.
PARALLEL TABLE LOOKUP FOR NEXT GENERATION INTERNET
IP Address Lookup Masoud Sabaei Assistant professor
LayeredTrees: Most Specific Prefix based Pipelined Design for On-Chip IP Address Lookups Author: Yeim-Kuau Chang, Fang-Chen Kuo, Han-Jhen Guo and Cheng-Chien.
Author: Sriram Ramabhadran, George Varghese Publisher: SIGMETRICS’03 Presenter: Yun-Yan Chang Date: 2010/12/29 1.
Multi-Field Range Encoding for Packet Classification in TCAM Author: Yeim-Kuan Chang, Chun-I Lee and Cheng-Chien Su Publisher: INFOCOM 2011 Presenter:
CMSC 341 B- Trees D. Frey with apologies to Tom Anastasio.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture17.
Lecture 9 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
Segment Trees Basic data structure in computational geometry. Computational geometry.  Computations with geometric objects.  Points in 1-, 2-, 3-, d-space.
Sets of Digital Data CSCI 2720 Fall 2005 Kraemer.
Marwan Al-Namari Hassan Al-Mathami. Indexing What is Indexing? Indexing is a mechanisms. Why we need to use Indexing? We used indexing to speed up access.
Memory-Efficient IPv4/v6 Lookup on FPGAs Using Distance-Bounded Path Compression Author: Hoang Le, Weirong Jiang and Viktor K. Prasanna Publisher: IEEE.
B-TREE. Motivation for B-Trees So far we have assumed that we can store an entire data structure in main memory What if we have so much data that it won’t.
Updating Designed for Fast IP Lookup Author : Natasa Maksic, Zoran Chicha and Aleksandra Smiljani´c Conference: IEEE High Performance Switching and Routing.
Parallel tree search: An algorithmic approach for multi- field packet classification Authors: Derek Pao and Cutson Liu. Publisher: Computer communications.
DESIGN AND IMPLEMENTATION OF DYNAMIC ROUTING TABLES Author: Yeim-Kuan Chang and Dung-Jiun Lin Publisher/Conf.: The graduation paper of CIAL master student,
8/3/2007CMSC 341 BTrees1 CMSC 341 B- Trees D. Frey with apologies to Tom Anastasio.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
SCALAR PREFIX SEARCH: A NEW ROUTE LOOKUP ALGORITHM FOR NEXT GENERATION INTERNET Author: Mohammad Behdadfar, Hossein Saidi, Hamid Alaei and Babak Samari.
Scalable Multi-match Packet Classification Using TCAM and SRAM Author: Yu-Chieh Cheng, Pi-Chung Wang Publisher: IEEE Transactions on Computers (2015) Presenter:
BCA-II Data Structure Using C
AN ON-CHIP IP ADDRESS LOOKUP ALGORITHM
Multiway range trees: scalable IP lookup with fast updates
Digital Search Trees & Binary Tries
Lecture 7 Algorithm Analysis
Segment Trees Basic data structure in computational geometry.
Indexing and Hashing Basic Concepts Ordered Indices
B- Trees D. Frey with apologies to Tom Anastasio
Lecture 7 Algorithm Analysis
Digital Search Trees & Binary Tries
B- Trees D. Frey with apologies to Tom Anastasio
Lecture 7 Algorithm Analysis
AVL-Trees.
Authors: A. Rasmussen, A. Kragelund, M. Berger, H. Wessing, S. Ruepp
Presentation transcript:

The CPBT: A Method for Searching the Prefixes Using Coded Prefixes in B-Tree Author: Mohammad Behdadfar and Hossein Saidi Publisher: LNCS 2008 Presenter: Chen-Yu Chang Date: 2009/2/25

Outline PIBT(Prefix in B-Tree) Review Proposed Encoding of Prefixes, the Main Idea CPBT(Coded Prefix in B-Tree) The Comparison of the Proposed Algorithm and PIBT

PIBT Review(1/6) Consider each node of a simple B-tree with “t " keys. The PIBT structure is made by the endpoints and some additional vectors called "Interval Vector" and "Equal Vector". Assume that X is a B-tree node with t keys and the information stored in the X has the following format:  t, child0, (key1, child1), (key2, child2), …, (keyt, childt) child i is a pointer to X's i'th sub-tree and assume that key 1 <key 2 <…<key t.

PIBT Review(2/6) It also separates each prefix into two end points and uses a key for each of them. Therefore for n prefixes it may use up to 2n keys.

PIBT Review(3/6) Also assume that key 0 = start(int(x)) and key t+1 = finish(int(x)). Then, using the previous definitions, for the child i subtree we have:  int i (X) = int(child i ) = [key i, key i+1 ], 0 ≤ i ≤ t. Ex: int(x)=[0, 31], int 0 (x)=int(y)=[0, 7], int 1 (x)=int(z)=[7, 16], int 2 (x)=int(w)=[16, 31], int 0 (y)=[0, 0], int 1 (y) = [0,4], int 2 (y) =[4,7], and int 0 (z)=[7,8].

PIBT Review(4/6) Interval Vector : The bit X.interval i [j] is 1 iff a prefix with length “j” exists which its range contains int i (x).  Ex: y.interval 2 [3] = 1 because prefix P1 has length 3 and range [4,7]; [4,7] includes int 2 (y) = [4,7] but not int(y) = [0,7]. Equal Vector : The bit x.equali[j] is 1 iff there is a length “j” prefix that has a start or finish endpoint equal to keyi of x.  Ex: prefixes P2 and P6 have 0 as their start endpoint. Since the length of P2 is 2 and that of P6 is 1, y.equal 1 [l] = y.equal 1 [2] = 1; all other bits of y.equal 1 are 0.

PIBT Review(5/6) The search procedure is as follows:  PIBT-search algorithm first makes a W-bit vector named Match- Vector with all bits set to '0'.  If the router table has any prefix with length "j", with start or end point equal to the destination address using the Equal Vectors, then the Match-Vector[j] bit will be set to '1'.  Otherwise the corresponding Interval Vectors of the current searching node are checked and if a match with length j is found, then the bit Match-Vector[j] will be set to '1', else this bit is not changed.  The maximum j such that Match-Vector[j] = 1 is the length of Imp(d).

PIBT Review(6/6)

Outline PIBT(Prefix in B-Tree) Review Proposed Encoding of Prefixes, the Main Idea CPBT(Coded Prefix in B-Tree) The Comparison of the Proposed Algorithm and PIBT

Encoding of Prefixes Consider a prefix p with k bits and W bit addresses. Each bit of prefix p, would be coded into a 2 bit value as follows: for each bit '1', 2 bits '10', for each bit '0' two bits '01' and for each blank place, 2 bits '00' are substituted.  Ex: if W=5 With the above definition, the prefixes can be compared like numbers and we'll have:

Problem Now, assume W=6 and an input destination address of "d=010100". The objective is to find LMP of d in the tree. "d>01*" and "d>0100*“, and also d matches with "01*". Therefore we should save "01*" as the LMP up to now and go through C2. In C2 there isn't any key matching with d. Therefore the LMP result for d would be "01*"

A Method for Finding the LMP To solve this problem, we introduce an additional vector stored with each key, called "Shorter Matching Vector" or SMV. This vector is W bits long. Consider a key "k" in the database and its SMV, if bit "i" of SMV is set to 1, it means that a prefix with length i exists in the tree which is a prefix of "k".

Outline PIBT(Prefix in B-Tree) Review Proposed Encoding of Prefixes, the Main Idea CPBT(Coded Prefix in B-Tree) The Comparison of the Proposed Algorithm and PIBT

Modification of the main idea Instead of storing the encoded prefixes, the prefixes might be stored as W bit vectors.  Ex: if W=6 and a prefix p=110*, a W bit vector '110000' should be stored instead of p. Additionally a 6 bits SMV is stored with this prefix, and its third bit (the prefix length) is set to one. Additionally, although keys are saved as W bit vectors, in comparing two keys, the same notion of "encoding the prefixes" to the "numbers" which was described earlier will be used.

Assumption First of all, consider the following assumptions:  The length of a prefix p is shown by len(p).  The ith key in a node "N" can be showed by N(i).  The length of the IP Address is assumed to be: W.  The SMV vector of a prefix p is shown by SMV p.  Consider two prefixes, p and x. if p is a prefix of x, we use the following notation: p → x and if p is not a prefix of x we use this notation: p ╫ x.  If p → x, the bit of SMVx which corresponds to p is shown by SMV x (len(p)).  A prefix of x with length of k is shown by len k (x).  If the SMV of a prefix x overwrites the SMV of a prefix y, x is called the Master and y is called the Slave.

Insertion(1/3) The Insert procedure is described as follows:  The new adding prefix is compared with all the keys in the root to find its location among them.  On the search path of inserting a prefix p, in the first node which contains any prefix x with the property of p → x, the SMVx(len(p)) will be updated to '1' for all the keys with the above property.  At last, after storing p in a node, for example node S, we will set the SMV vectors such that: o For each prefix x in node S, if p → x then SMVx(len(p))=1. o For each prefix x in node S, if there is a length k such that the bit k of its SMV is already set to 1 (or SMVx(k)=1) and if lenk(x)→p then it will set the SMVp(k)=1.

Insertion(2/3)

Insertion(3/3)

Deletion(1/2) The delete procedure is described as follows:  Initially, a deleting prefix "p" is compared with all the keys in the root to find its location among them.  During the search for the prefix, some other prefixes which p is also a prefix of them may be found. If any of these prefixes is found in the search path, its SMV will be updated immediately.  Otherwise, it is necessary to search the path to the predecessor or the successor of p in the database. If other prefixes are found which p is a prefix of them, then its corresponding bit in their SMV vectors will be set to zero.

Deletion(2/2)

Search of LMP Consider an input address d for the search. An SMV called SMV d is defined to store the information about the prefixes of d and all of its bits are set to *. For any stored prefix x in the root node if len i (x) is a prefix of d, the corresponding bit in the SMV d (i) will be set to "0" or "1" based on the SMV x (i) and it will not change during the search operation anymore. The rightmost "1" of SMV d represents the LMP of d.

Outline PIBT(Prefix in B-Tree) Review Proposed Encoding of Prefixes, the Main Idea CPBT(Coded Prefix in B-Tree) The Comparison of the Proposed Algorithm and PIBT

The Comparison of the Proposed Algorithm and PIBT(1/2) The number of keys in proposed tree will be half of the number of keys of PIBT. The proposed scheme reduces the required vector bits to 1/4. It means that it requires 32 bits for IPv4 and 128 bits for IPv6, comparing to128 and 512 bits for PIBT. In proposed architecture, the update of a prefix and SMV vectors could be done simultaneously but PIBT cannot, this means less number of memory accesses for each update.

The Comparison of the Proposed Algorithm and PIBT(2/2) In this scheme we need to insert or delete only one prefix in each update process, however in the case of PIBT, it may require to insert or delete both two end points of a prefix which means traversing the tree twice. Tt is shown that although both of them have the same search complexity; this scheme has much better storage requirements and about half of the memory accesses during the update procedures.