Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "13 April 20081 Content Addressable Memory Using B-Tree Jack Dennis MIT Computer Science and Artificial Intelligence Laboratory."— Presentation transcript:

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

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

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

4 13 April 20084 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

5 13 April 20085 A B-Tree Node Invariants (Order Z B-Tree; Z = 8 above): kiki k 15 k0k0 k < k 0 k i > k > k i+1 k > k 15 k i+1 p0p0 pipi p 16 - 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 subtree pointers in a leaf node are null (and only those) All leaf nodes are at the same level.

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

7 13 April 20087 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.

8 13 April 20088 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.

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


Download ppt "13 April 20081 Content Addressable Memory Using B-Tree Jack Dennis MIT Computer Science and Artificial Intelligence Laboratory."

Similar presentations


Ads by Google