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

Linear Algebra: A Modern Introduction
4th Edition
ISBN:9781285463247
Author:David Poole
Publisher:David Poole
Chapter2: Systems Of Linear Equations
Section2.4: Applications
Problem 24EQ: Suppose the coal and steel industries form a closed economy. Every $1 produced by the coal industry...
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Linear Algebra: A Modern Introduction
Linear Algebra: A Modern Introduction
Algebra
ISBN:
9781285463247
Author:
David Poole
Publisher:
Cengage Learning
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,