Description: A multithreaded merge sorting program works as follows: A list of N integers is divided into k, sub-lists of equal sizes. Then, a number equal to k sorting threads are created in order to sort each sub-list using any O(n log2 n) sorting algorithm. Because global data are shared across all threads, perhaps the easiest way to set up the shared data is to create a global integer array, A. Partitioned carefully, each sorting thread will work independently on one part of this array. A second local integer array, B, of the same size as A, will also be established. A merge thread will then merge the k sorted sub-lists into this second array, producing a sorted list. Graphically, the suggested program is structured as in the shown figure: original list 7, 12, 19, 3, 18, 4, 2, 6, 15, 8 sorting threadi sorting shreac 7,12, 19, 3, 18 4, 2, 6, 15,8

Elementary Linear Algebra (MindTap Course List)
8th Edition
ISBN:9781305658004
Author:Ron Larson
Publisher:Ron Larson
Chapter7: Eigenvalues And Eigenvectors
Section7.CM: Cumulative Review
Problem 30CM
icon
Related questions
Question
Description:
A multithreaded merge sorting program works as follows: A list of N integers is divided into k, sub-lists
of equal sizes. Then, a number equal to k sorting threads are created in order to sort each sub-list using
any O(n log, n) sorting algorithm. Because global data are shared across all threads, perhaps the easiest
way to set up the shared data is to create a global integer array, A. Partitioned carefully, each sorting
thread will work independently on one part of this array. A second local integer array, B, of the same
size as A, will also be established. A merge thread will then merge the k sorted sub-lists into this second
array, producing a sorted list. Graphically, the suggested program is structured as in the shown figure:
original list
7,12, 19, 3, 18,4, 2, 6, 15, 8
sorting
threadi
sorting
shreac
7,12, 19, 3, 18
4, 2,6, 15,8
merge thread
2, 3,4, 6, 7,8, 12, 15, 18, 19
sorted list
Transcribed Image Text:Description: A multithreaded merge sorting program works as follows: A list of N integers is divided into k, sub-lists of equal sizes. Then, a number equal to k sorting threads are created in order to sort each sub-list using any O(n log, n) sorting algorithm. Because global data are shared across all threads, perhaps the easiest way to set up the shared data is to create a global integer array, A. Partitioned carefully, each sorting thread will work independently on one part of this array. A second local integer array, B, of the same size as A, will also be established. A merge thread will then merge the k sorted sub-lists into this second array, producing a sorted list. Graphically, the suggested program is structured as in the shown figure: original list 7,12, 19, 3, 18,4, 2, 6, 15, 8 sorting threadi sorting shreac 7,12, 19, 3, 18 4, 2,6, 15,8 merge thread 2, 3,4, 6, 7,8, 12, 15, 18, 19 sorted list
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
Recommended textbooks for you
Elementary Linear Algebra (MindTap Course List)
Elementary Linear Algebra (MindTap Course List)
Algebra
ISBN:
9781305658004
Author:
Ron Larson
Publisher:
Cengage Learning
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
College Algebra
College Algebra
Algebra
ISBN:
9781337282291
Author:
Ron Larson
Publisher:
Cengage Learning