Presentation is loading. Please wait.

Presentation is loading. Please wait.

Parallel sorting.

Similar presentations


Presentation on theme: "Parallel sorting."— Presentation transcript:

1 Parallel sorting

2 Sorting algorithms Bubble sort
Step through the list to be sorted reapeatedly. Compare each pair of adjacent items. Swap them if they are in the wrong order. The iteration is finished when no swaps are needed. Performance Worst case: O(n2) Best case: O(n) Average: O(n2)

3 Sorting algorithms Odd-even sort Parallel version of bubble sort
Compare each odd/even indexed pairs of adjacent items. Swap them if they are in the wrong order. Compare each even/odd indexed pairs of adjacent items. The iteration is finished when no swaps are needed. Performance Worst case: O(n2) Best case: O(n)

4 Sorting algorithms Bucket sort Paritition the data into n buckets.
Distribute the ith bucket to ith node. Sort locally with a block sort. Collect the sorted buckets from the nodes. It’s an extended quick sort style algorithm. Performance Performance of the block sort.

5 Sorting algorithms Hybrid parallel sort
Distribute the data to n nodes. Perform a local block sort. Merge the results on the head node. Performance Performance of the block sort + merge sort.

6 Sorting algorithms Radix sort
Non-comparative integer sorting algorithm. Sorts data with integer keys Grouping keys by the individual digits with the same position and value. Performance Worst case: O(wn)

7 Assignment Implement an efficient parallel sorting algorithm!
Measure the performance scaling with 1m to 100m integer data elements!


Download ppt "Parallel sorting."

Similar presentations


Ads by Google