Page 1 of 1

Time left 0:55:31 Write a C program to implement the multi-threaded system shown in the following figure : Thread 1 Thre

Posted: Tue Sep 07, 2021 7:13 am
by answerhappygod
Time Left 0 55 31 Write A C Program To Implement The Multi Threaded System Shown In The Following Figure Thread 1 Thre 1
Time Left 0 55 31 Write A C Program To Implement The Multi Threaded System Shown In The Following Figure Thread 1 Thre 1 (68.57 KiB) Viewed 102 times
Time left 0:55:31 Write a C program to implement the multi-threaded system shown in the following figure : Thread 1 Thread 2 Shared Memory You are required to create two threads, communicate via shared memory. Thread 1 reads two integer numbers from the standard input and sends it to Thread 2 via the shared memory, then waits for the Thread 2 response. Thread 2 is specialized in calculation of summation and multiplication of the received two numbers. Therefore, for example, if Thread 1 sends the numbers (3,2) via the shared memory, Thread 2 will read the numbers and calculate the summation and multiplication of the two numbers, and send the results (5,6) via the shared memory. When Thread 1 receives the results from Thread 2, it prints it out on standard output. • In your code you should write a general commented block in the beginning of your file as a pseudo code represents a description for your problem solving plan . You must properly handle invalid return values by displaying an error message . Your output should be readable • The output of your program must be properly labeled and easy to read. You must prompt and echo all inputs Paragraph BE