A Parallel Algorithm for Merging Heaps on MasPar Machine

MasPar 머쉰상의 병렬 힙 병합 알고리즘

  • 민용식 (호서대학교 전자계산학과)
  • Published : 1995.07.01

Abstract

In this paper, we suggest a parallel algorithm to merge priority queues organized in two heaps, kheap and nheap of sizes k and n, correspondingly. Employing max(2$^{-1}$, $\ulcorner$(m+1)/4$\lrcorner$'s processors, this algorithm requires O(log(n/k)*log(n)) on an EREW-PRAM, where i is the height of the heap and m is the summation of sizes n and k. Also, when we run it on the MasPar machine, this method achieves a 33.934-fold speedup with 64 processors to merge 8 million data items which consist of two heaps of different sizes. So our parallel algorithm's EPU is close to 1, which is considered as an optimal speedup ratio.eedup ratio.

본 논문은 크기가 n와 k인 nheap과 kheap을 병합시키기 위한 병렬 알고리즘을 제 시함과 동시에 그들을 MasPar상에 실제로 구현하고자 하는데 그 주된 목적이 있다. 이때, EREW-PRAM(Exclusive-Read Exclusive-Write Parallel Random Acess Machin)상에 서 max(2$^{-1}$, $\ulcorner$(m+1)/4$\lrcorner$개의 프로세서를 이용해서 본 논문에 제시된 알고리즘 의 시간 복잡도가 O(log(n/k)*log(n))임을 제시하였다. 여기서 i는 heap의 height를 뜻하며, m은 크기 n과 k의 합으로 구성된 것이다. 또한 이것을 MasPar 컴퓨터에 적용 을 시켰을 때, 테이타의 양이 8백만개이고, 64개의 프로세서를 이용한 경우의 speedup 을 33.934를 얻었다. 이때 적용된 데이타의 형태는 불완전 힙상에서 크기가 k〈n를 지 니는 경우의 처리이다. 그리고 이같이 제시된 알고리즘의 EPU(Effective Processor Utilization)을 계산하면 1인 최적의 speedup율을 나타냄을 알 수가 있다.

Keywords