Question: CSC 2 4 0 Exercise 5 Specifications CSC 2 4 0 Exercise 5 5 . 1 Run the parallel merge sort on your own computer,

CSC 240 Exercise 5 Specifications
CSC 240
Exercise 5
5.1 Run the parallel merge sort on your own computer, trying various chunk sizes, to see how much
speed-up you can obtain from the available parallelism. Write a report of at least 100 words.
5.2 The C++ thread library provides a function that returns the number of threads that the
hardware is capable of running. Here is how to get the number of threads available:
unsigned int maxthreads = thread::hardware_concurrency ();
Modify the parallel merge sort so that it will utilize the number of threads available (maxthreads).
Calculate the maximum chunk size allowed to equally distribute the job amongst the threads:
MAX_ITEMS/maxthreads. Make sure the chunk size can't be greater than this ratio, but it can be
less. Record the results from this modification.
5.3 Comparing the results of your experiments in Exercise 5.1 with the performance obtained from
the approach in Exercise 5.2, does using a thread count that is greater than the number available
from the hardware ever produce faster performance? Is it possible to get consistently better
performance on average, or is the overall performance just within the normal range of variation?
Will chunk sizes slightly less than or slightly greater than the chunk sizes used in Exercise 5.2 yield a
better overall performance?
5.4 Now, redo 5.1 to 5.3 on another system that allows more or less threads to run concurrently.
Write a report of at least 250 words that identifies your observations and conclusions regarding this
experiment.
CSC 2 4 0 Exercise 5 Specifications CSC 2 4 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!