Journal of the Association for Computing Machinery, Vol. 42, No. 4, July 1995, pp. 919–933.

Greed Sort: Optimal Deterministic Sorting on Parallel Disks

MARK H. NODINE

AND

JEFFREY SCOTT VITTER

Abstract. We present an algorithm for sorting efficiently with parallel, two-level memories. Our main result is an elegant, easy-to-implement, optimal, deterministic algorithm for external sorting with D disk drives. This results answers in the affirmative the open problem posed by Vitter and Shriver of whether an optimal algorithm exists that is deterministic. Our measure of performance is the number of parallel input/output (I/O) operations, in which each of the D disks can simultaneously transfer a block of B contiguous records. We assume that internal memory can hold M records. Our algorithm sorts N records in the optimal bound of Θ((N/BD) log(N/B)/ log(M/B)) deterministically, and thus it improves upon Vitter and Shriver’s optimal randomized algorithm as well as the well-known deterministic but nonoptimal technique of disk striping. It is also practical to implement.

Categories and Subject Descriptors. B.4.4 [worst-case analysis]; F.1.2 [parallelism and concurrency]; F.2.2 [sorting and searching]; E.5 [sorting/searching]

General Terms. Algorithms

Additional Key words and Phrases. I/O complexity, parallel disks, parallel I/O, merge sort

Copyright 1995 by ACM, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or direct commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or permissions@acm.org.