Partitioning of sorted lists (containing duplicate entries) for multiprocessors sort and merge
1. Technical Field According to a preferred embodiment, a method of sorting a list of elements with duplicate entries using multiple processors is disclosed. Using "P" processors, a list of elements is split into P lists and each processor pre-sorts a list. All pre-sorted lists are lined u...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Patent |
Sprache: | eng |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | 1. Technical Field
According to a preferred embodiment, a method of sorting a list of elements with duplicate entries using multiple processors is disclosed. Using "P" processors, a list of elements is split into P lists and each processor pre-sorts a list. All pre-sorted lists are lined up to form a partitioning table, with each pre-sorted list making up a column in the table, and the first element from each pre-sorted list making up the first row in the table, and the second element from each pre-sorted list making up the second row, etc. P−1 partition boundary lines are drawn through the partition table to create P equally sized partitions. Each partition boundary line is drawn such that every element below the line has a value larger than any element above the line, and every element above the line has a value smaller than any element below the line. Duplicate elements are uniquely "weighted" during the partitioning process. Thus, with respect to duplicate elements, each partition boundary lines is drawn such that every duplicate element below the line weighs more than any duplicate element above the line, and every duplicate element above the line weighs less than any duplicate element below the line. In this manner, tabularized pre-sorted lists are grouped into P partitions, which are merged and re-sorted into P sorted lists. Finally, the P sorted lists are simply strung together to provide a sorted list of all elements. Maximum use of P processors is obtained, and a near linear improvement in sort time is obtained when adding further processors. |
---|