Advanced Topic 39 of 51 Concurrency & Parallelism
Parallel Sorting
Sorting algorithms designed for many processors.
How it works
Parallel sorting algorithms speed up sorting using multiple processors. Parallel merge sort splits data, sorts parts independently and merges them, with parallel merging using binary search to split merges; parallel quicksort partitions in parallel; sample sort picks splitters to distribute buckets across processors for distributed memory; bitonic sort uses a fixed network of compare-exchange operations that suits GPUs and hardware; and radix sort with parallel scans is the fastest on GPUs for integer keys.
Where it is used
Database engines, big-data frameworks such as Spark and MapReduce, GPU libraries such as CUB and Thrust and the parallel STL implement parallel sorts for large datasets.
Common pitfall
Load imbalance from poor splitters or skewed data leaves processors idle. Communication in distributed sorting dominates cost, requiring careful data exchange. For small arrays, overhead exceeds gains, so use a sequential threshold. Stability needs care. Memory bandwidth limits speedup, and bitonic sort does more work than comparison sorts. Choose by data type, size and hardware.
Where it fits in the course
Parallel Sorting is topic 39 of 51 in Concurrency & Parallelism, rated Advanced. It follows GPU Memory Hierarchy. The next topic is Load Balancing in Parallel Programs.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Concurrency & Parallelism quiz.
- Explore the Sorting Algorithms visualizer: Bubble, selection, insertion, merge and quick sort animated.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Concurrency & Parallelism quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Parallel Sorting?
Where do people use Parallel Sorting?
What is the most common mistake with Parallel Sorting?
What should I learn before this topic?
How can I practice it?
Is Parallel Sorting hard to learn?
How long does it take to learn Parallel Sorting?
Which topics are related to Parallel Sorting?
What should I study after Parallel Sorting?
Related topics
- GPU Memory Hierarchy (Concurrency & Parallelism)
- Load Balancing in Parallel Programs (Concurrency & Parallelism)
- CUDA Programming (Concurrency & Parallelism)
- False Sharing (Concurrency & Parallelism)