Question: BELOW IS THE QUESTION AND TWO CODES THAT WERE PROVIDED TO HELP. PLEASE USE AS MUCH AS YOU CAN OF THE PROVIDED CODE. TRY TO

BELOW IS THE QUESTION AND TWO CODES THAT WERE PROVIDED TO HELP. PLEASE USE AS MUCH AS YOU CAN OF THE PROVIDED CODE. TRY TO KEEP THE CONCEPTS SIMPLE AND USE MULTIPLE THREADS IF NEEDED. MAYBE 5 OR 6.

BELOW IS THE QUESTION AND TWO CODES THAT WERE PROVIDED TO HELP.PLEASE USE AS MUCH AS YOU CAN OF THE PROVIDED CODE. TRY

TO KEEP THE CONCEPTS SIMPLE AND USE MULTIPLE THREADS IF NEEDED. MAYBE

4. Given the table for serial and parallel execution times of a program with different number of processors, find and fill the blanks in the table and figure out the most efficient number of processors for the parallel approach. Keep in mind that the first column is for serial program not for parallel. Show your calculations. (20 points) Table 1 Speed ups and Efficiencies of a serial and parallel program Number of Processors 1 2 4 8 2 16 Tserial (miliseconds) 30 30 30 30 30 Tparallel (miliseconds) 30 25 10 6 5 Speedup Efficiency Enter rows and columns for first matrix: 2 2 Enter rows and columns for second matrix: 2 2 Enter elements of matrix 1: Enter element a11 : 1 Enter element a12 : 2 Enter element a21 : 3 Enter element a22 : 4 Enter elements of matrix 2: Enter element b11 : 4 Enter element b12 : 3 Enter element b21 : 2 Enter element b22 : 1 Output Matrix: 85 20 13 #include #include using namespace std; // This program finds the sum of numbers from 0-100 with 11 variable p number of threads int global_sum = @; int N = 101; const int P = 5; void myThreadMethod( int id) { int local_sum = %; int mystart. - id * N/P int myend - (id + 1) * N/P for (int i = mystart; i join(); } cout #include using namespace std; // This program finds the sum of numbers from 0-100 with 11 variable p number of threads int global_sum = @; int N = 101; const int P = 5; void myThreadMethod( int id) { int local_sum = %; int mystart. - id * N/P int myend - (id + 1) * N/P for (int i = mystart; i join(); } cout

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 Databases Questions!