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 Exercise Specifications
CSC
Exercise
Run the parallel merge sort on your own computer, trying various chunk sizes, to see how much
speedup you can obtain from the available parallelism. Write a report of at least words.
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::hardwareconcurrency ;
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:
MAXITEMSmaxthreads Make sure the chunk size can't be greater than this ratio, but it can be
less. Record the results from this modification.
Comparing the results of your experiments in Exercise with the performance obtained from
the approach in Exercise 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 yield a
better overall performance?
Now, redo to on another system that allows more or less threads to run concurrently.
Write a report of at least words that identifies your observations and conclusions regarding this
experiment.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
