Abstract
We design a cost-optimal algorithm for managing a parallel heap on an exclusive-read exclusive-write (EREW), parallel random access machine (PRAM) model. We also analyze the time and space complexities of our algorithm, which efficiently employs p processors in the range 1 ≤ p ≤ n, where n is the maximum number of items in the parallel heap. It is assumed that a delete-think-insert cycle is repeatedly performed, and each processor requires an arbitrary but the same amount of time (called the think time) for processing an item which in turn generates at most two new items. The use of a global data structure for each level of the heap helps reduce the working memory space required. The time complexity for deleting p items of the highest priority from the parallel heap is O(logp), while that for inserting at most 2p new items is O(logn). With or without incorporating the think time, the speedup of our algorithm is shown to be linear, i.e. O(p). Hence this algorithm is an improvement in time over the one proposed by Deo and Prasad [5, 6].
Notes
∗This work was in part supported by Texas Advanced Technology Program Grant under Award No. TATP-003594031. (A preliminary version of this paper was presented at the International Conference on Parallel Architectures and Languages Europe, June 1991, Eindhoven, The Netherlands.) The authors can be reached at (817) 565-4256 and via email at [email protected]
†Current address: Dept. of Computer Science and Information Engineering, Tamkang Univ, Tamsui, Taipei, Taiwan.