Question: Write CODE. This is in C programming. Looks fine. Please help. Performance measurement of a program with multiple threads Let's implement a general matrix multiplication

Write CODE.

This is in C programming. Looks fine. Write CODE. This is in C programming. Looks fine. Please help. Performance

Please help.

Performance measurement of a program with multiple threads Let's implement a general matrix multiplication with use of system calls: gettimeofday and getrusage. You will run the program for N (matrix size) -1000, 2000, and 4000, respectively to fill up the table in milliseconds: The matrix dimension is N rows by N columns. You will create M multithreads to do the multiplication, dividing the job by rows or columns. and m will be the number of threads to be created The matrix element (ij) will be of type "double", initially setting to (double)rand()/RAND_MAX+1; Your program will take option "-N" and"-M" as inputs, "yourmul-N n-M m, where n will be the matrix size If you run your program multiple times for the same value of N, pick one of them or avg to fill in the table a) For M=1 (in milliseconds): Elapsed Time (30%) USR Time SYS Time USR+SYS Time 4000 b) (25%) For M=2 (in milliseconds Elapsed Time USR Time SYS Time USR+SYS Time 4000 c) (25%) For M-4 (in milliseconds Elapsed Time USR Time SYS Time USR+SYS Time 1000 d) (10%) By checking your system information from "/proc/cpuinfo", list # of cores, its clock speed, and load e) (10%) Compare "Elapsed Time" and "USR-SYS Time" from 5a) and 5c) for N-4000. Discuss your findings. Here is a brief explanation about time & clocks. average (use "uptime") Wall Clock time -the amount of time the process takes to run, sometimes called elapsed time User (CPU) time the CPU time attributed to user instructions System (CPU) time the CPU time attributed to the kernel when it executes on behalf of the process

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!