content addressable memory using b tree
play

Content Addressable Memory Using B-Tree Jack Dennis MIT Computer - PowerPoint PPT Presentation

Content Addressable Memory Using B-Tree Jack Dennis MIT Computer Science and Artificial Intelligence Laboratory 13 April 2008 1 Multi-Thread, Multi-Core Chip Instr Association Data Association Thread Scheduler CAM CAM MTP MTP MTP


  1. Content Addressable Memory Using B-Tree Jack Dennis MIT Computer Science and Artificial Intelligence Laboratory 13 April 2008 1

  2. Multi-Thread, Multi-Core Chip Instr Association Data Association Thread Scheduler CAM CAM MTP MTP MTP MTP Instruction Access Net Data Access Net IAU IAU DAU DAU Shared Memory System Interface 13 April 2008 2

  3. Data Structures: The Heap as a DAG • Cycle-Free Heap • Arrays as Trees Root Chunk Leaf Chunks • Fan-out as large as 16 • Three levels yields 4096 elements (longs) 13 April 2008 3

  4. B-Trees A Data Structure that represents a collection of keys In an Order Z B-Tree, each node holds at least Z keys and associated pointers to subtrees. An order Z B-Tree of depth h can hold at least (Z h * 2) – 1 keys 13 April 2008 4

  5. A B-Tree Node p 0 p i p 16 - - - - k 0 k i k i+1 k 15 k i > k > k i+1 k < k 0 k > k 15 Invariants (Order Z B-Tree; Z = 8 above): Number of keys at a node: at least Z; at most Z*2 Exception: The root node may contain as few as zero keys. All leaf nodes are at the same level. All subtree pointers in a leaf node are null (and only those) 13 April 2008 5

  6. A Hardware B-Tree CAM M 0 > keys = compare < pointers match stunt box M pointer to next node M 15 U pointer index > keys [0..16] = compare X < pointers M 16 key pointers 13 April 2008 6

  7. Insert 1. Search the B-Tree for the new key; failure if found. 2. If the leaf node is full it must be split into two nodes, each holding Z keys. The median key of the set of keys held by the found leaf node and the key to be inserted is inserted into the parent node, continuing up the tree. 3. To do insert in a single pass, split any full node encountered during the search to anticipate the need. 13 April 2008 7

  8. Delete 1. Search the B-Tree for the given key; failure if not found. 2. To do delete a key from a leaf node, it may be necessary to move in a key from a neighboring node; if this is not possible, the leaf node may be joined with one of its neighbors and the pointer to the lost node deleted from the parent 3. A few more complications arise. 13 April 2008 8

  9. B-Tree Node Rearrangement new key, pointer write M 0 read M 0 keys keys pointers pointers Switch M 15 M 15 keys keys pointers pointers M 16 M 16 pointers pointers Split/Join 13 April 2008 9

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend