2.2 Concurrent Heap
A concurrent heap is simply a conventional heap structure with some flags associated with each node to support concurrent deletions and insertions. Insertion proceeds from root down to the target node along its unique “insertion path.” The insert item keeps sinking down until the heap property is satisfied. Deletion naturally flows top-to-bottom. After deletion, a substitute item is brought in at the root from the last node, and then this substitute is sunk to satisfy the heap property. This substitute needed from the last node may not be immediately available because it could be en route to the last node while being inserted. In that case, the delete process sets a ‘ wanted ’ flag at the last node. The insert process keeps checking the status of its target node and directly places its insert items at the root as the substitute item, once its item becomes ‘ wanted. ’ Since inserts are immediately followed by a delete, both are combined and processed together: If the insert item is smaller than the item at the root, the processor returns with the insert item itself for the subsequent think phase leaving the heap intact. Else, the root item is deleted, and the insert item is used as the substitute item to update the heap. Same strategy can also be employed for serial heap. Readers are referred to [7] for further details.
2
2.2 Concurrent Heap A concurrent heap is simply a conventional heap structure with some flags associated with each node to support concurrent deletions and insertions. Insertion proceeds from root down to the target node along its unique “insertion path.” The insert item keeps sinking down until the heap property is satisfied. Deletion naturally flows top-to-bottom. After deletion, a substitute item is brought in at the root from the last node, and then this substitute is sunk to satisfy the heap property. This substitute needed from the last node may not be immediately available because it could be en route to the last node while being inserted. In that case, the delete process sets a ‘ wanted ’ flag at the last node. The insert process keeps checking the status of its target node and directly places its insert items at the root as the substitute item, once its item becomes ‘ wanted. ’ Since inserts are immediately followed by a delete, both are combined and processed together: If the insert item is smaller than the item at the root, the processor returns with the insert item itself for the subsequent think phase leaving the heap intact. Else, the root item is deleted, and the insert item is used as the substitute item to update the heap. Same strategy can also be employed for serial heap. Readers are referred to [7] for further details. 2
การแปล กรุณารอสักครู่..