Question: Read the question and create child process stop pasting code from other Cheng answer it is not correct and will be downvoted. Question: USE fork()
Read the question and create child process stop pasting code from other Cheng answer it is not correct and will be downvoted. 
Question: USE fork() for child process! #include library is us... You will be using Linux shared memory to solve the following problem by a program comprising concurrent processes Matrix Multiplication: Matrix multiplication is a computation intensive problem when the matrices are large and is often achieved by concurrent programming In this assignment you will focus on a scaled-down version of the problem. You have to write a concurrent program consisting of four processes that computes the product of two 4 x 4 matrices of integers. The parent process will fork four child processes P1, P2, P3, P4. The computation of the product is to be done by all the four processes PI... P4 that run concurrently on the system. All the matrices are to be stored in shared memory that is accessed by the processes. The two input matrices M and N hold the input data where as a third matrix Q is used to store the result. Each process Pi (i-1.4) is responsible for computing the values to be stored in row i of matrix Q. Note that the following formula is used to compute the element stored in row i and columnk of: Q[i,k] - - M[ij] N [ik] Addionally each process Pi will determine the largest integer, Li, in row i of the result matrix Q. Use "gettimeofday" that you have learned in your earlier lab execise to find out the time required to perform all the operartions. This can be done by inserting a call to gettimeofday just before the forking of the first child process and and another call afer all the operations by the child proceses are completed and reprorting the difference in times. Input: For this assignment you will need to put the input data for matrices M and N inside the program itself. That is, the program should initialize matrix M and N with a given set of data values. Output: (1) After the computation of the result matrix Q is complete any one of the processes has to print out M, N and Q. This process should also compare all the Li (i=1..4) values and print the largest integer in Q (ii) Each child Process Pi should print out "Child Process: working with row" followed by the row number of Q it is dealing with (iii) Print out the time required to perform all the operartions (as described earler) Your Job: (1) Write a program in C running under Linux to solve this problem, You will have to use Linux shared memory for storing the matrices The program should ensure that all the four processes are completed before the program completes (exits). The wait() system call can be used for ensuring this. Testing Test your program thoroughly with a number of different sets of data values. Along with other test cases your program must be tested with the data provided next Mandatory Test Data: M=20 20 50 40 10 6 70 8 40 3 2 10 8 7 6 5 N=10 30 50 70 1368 9557 8 6 4 2 USE fork() for child process! #include library is used for shared memory! Question: USE fork() for child process! #include library is us... You will be using Linux shared memory to solve the following problem by a program comprising concurrent processes Matrix Multiplication: Matrix multiplication is a computation intensive problem when the matrices are large and is often achieved by concurrent programming In this assignment you will focus on a scaled-down version of the problem. You have to write a concurrent program consisting of four processes that computes the product of two 4 x 4 matrices of integers. The parent process will fork four child processes P1, P2, P3, P4. The computation of the product is to be done by all the four processes PI... P4 that run concurrently on the system. All the matrices are to be stored in shared memory that is accessed by the processes. The two input matrices M and N hold the input data where as a third matrix Q is used to store the result. Each process Pi (i-1.4) is responsible for computing the values to be stored in row i of matrix Q. Note that the following formula is used to compute the element stored in row i and columnk of: Q[i,k] - - M[ij] N [ik] Addionally each process Pi will determine the largest integer, Li, in row i of the result matrix Q. Use "gettimeofday" that you have learned in your earlier lab execise to find out the time required to perform all the operartions. This can be done by inserting a call to gettimeofday just before the forking of the first child process and and another call afer all the operations by the child proceses are completed and reprorting the difference in times. Input: For this assignment you will need to put the input data for matrices M and N inside the program itself. That is, the program should initialize matrix M and N with a given set of data values. Output: (1) After the computation of the result matrix Q is complete any one of the processes has to print out M, N and Q. This process should also compare all the Li (i=1..4) values and print the largest integer in Q (ii) Each child Process Pi should print out "Child Process: working with row" followed by the row number of Q it is dealing with (iii) Print out the time required to perform all the operartions (as described earler) Your Job: (1) Write a program in C running under Linux to solve this problem, You will have to use Linux shared memory for storing the matrices The program should ensure that all the four processes are completed before the program completes (exits). The wait() system call can be used for ensuring this. Testing Test your program thoroughly with a number of different sets of data values. Along with other test cases your program must be tested with the data provided next Mandatory Test Data: M=20 20 50 40 10 6 70 8 40 3 2 10 8 7 6 5 N=10 30 50 70 1368 9557 8 6 4 2 USE fork() for child process! #include library is used for shared memory