40 likes | 162 Views
Sorting – More quicksort related. Jie Liu, Ph.D. Professor Department of Computer Science Western Oregon University USA liuj@wou.edu. Parallel Quick sort. 1. The simplest , two processor, one from the left, one from the right Speedup of two – max
E N D
Sorting – More quicksort related Jie Liu, Ph.D. Professor Department of Computer Science Western Oregon University USA liuj@wou.edu
Parallel Quick sort • 1. The simplest , two processor, one from the left, one from the right • Speedup of two – max • 2. Push every thing on to a stack, the free processor pick from the top • When the work is heavy, not many processors can participate • Speedup has an upper bound of 6 to 8
Hyper quick sort • Sort its local array • The designated processor find out the mean and send to all others. • Others split the values to two sets, the upper half keep the high set and send out the low set to the lower processor, • Lower half does the opposite • Iterate steps 1 to 4 until the cubes has a size of 1 • Modified (on the mean) not better
Parallel Sorting by Regular Sampling • Sort the local • Select and ship the sample • ** one processor sorts the sample, selects p -1 pivots, and sends it all others • All other divide the sorted list according to the pivots of step 3, • Each processor sends out sub arrays and collect data from others • Each sort locally