Question: Python3 Multi-processing Write two programs that create a templated Matrix class and do basic matrix multiplication. The first program should utilize the Python threading module,
Python3 Multi-processing
Write two programs that create a templated Matrix class and do basic matrix multiplication. The first program should utilize the Python threading module, and the second program should use the Python multiprocessing module.





$ more A.mat 1000 1000 $ more B.mat 1000 1000 $ more C.mat 1000 1000 1000 1000 1000 1000 . . . 1000 1000 1000 1000 1000 . . . 1000 1000 1000 1000 1000 . . . 1000 Turn in a single tar.gz file containing both your programs. Each program should be a single cpp file. Each program should run as follows (where A.mat, B.mat are the input matrices, C.mat is the output file, and the final nteger is the number of threads you wish to allocate:) Sub-task 1: Write a Python program that does multi-threaded matrix multiplication, and verify that there is little to no change from a single threaded solution to a multi-threaded solution. $ time python3 matrixMult.py A.mat B.mat C.mat 1 $ time python matrixMult.py A.mat B.mat C.mat 8 Sub-task 2: Write a Python program that does multi-threaded matrix multiplication, and note the speedup achieved with additional processes $ time python3 matrixMult.py A.mat B.mat C.mat 1 $ time python3 matrixMult.py A.mat B.mat C.mat 8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
