Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started