Question: Task 1: (Marks 20) Write a program that creates M worker threads to sum two M x N matrices and displays the resultant matrix. The

Task 1: (Marks 20) Write a program that creates M worker threads to sum two M x N matrices and displays the resultant matrix. The program is passed values of M & N through command-line arguments. The program then initializes the values of matrices using the rand() function. Task 2: (Marks 20) A friend of mine left her position teaching physics at FC College and took a job at PGCs. She was working in a cubicle in the basement of a huge building, and the nearest women's prayer room was two floors up. She proposed to her boss that women be allowed to pray in the men's pray room. The boss agreed, provided that the following synchronization constraints can be maintained: There cannot be men and women in the prayer room at the same time. There should never be more than three employees in the prayer room. You are supposed to write a synchronization solution for this problem and implement it in C language
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
