CS 284a LectureTuesday, 29 October, 1997
Multithreaded Sorting: The Problem with Quicksort and Mergesort
The PSRS Algorithm (Parallel Sorting by Regular Sampling)
PSRS Algorithm
Step 1: Divide the Data into Segments
Step 2: In Parallel, Sort the Data Segments
Step 3: Take Evenly-Spaced Sample Points From the Sorted Data Segments
Step 4: Sort the Data Sample
Step 5: Choose Evenly-Spaced Pivots From the Sorted Data Sample
Step 6: Partition the Sorted Data SegmentsUsing the Pivots
Step 7: Compute the Sizes of the Result Partitions
Step 8: In Parallel, Merge the Partitioned Data Segments into the Result Partitions
Overall Sequential Complexity
Multithreaded PSRS
Multithreaded PSRS Algorithm
Multithreaded Performance Issues
Costs of Partitioning
Email: cs284@cs.caltech.edu
Home Page: http://www.cs.caltech.edu/~cs284/