Question: 1 . [ 1 POINT ] In the main thread, declare a list of 2 million numbers and initialize it with random numbers between -
POINT In the main thread, declare a list of million numbers and initialize it with random numbers between and
POINT Divide the list into ten sublists.
POINT Define a function named sumofsqures to calculate the sum of squares of a list.
POINTS Create ten child threads so that each of them is responsible to find the sumofsqures for each sublist.
POINT The main thread should then sum all the returned results from the child threads to get the final result.
POINT The main thread should then reinitialize the original list with new random numbers and repeat the whole process for times.
POINTS Use barriers to synchronize the work between the main thread and the child threads.
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
