Question: operating system : solve this task please ! use message queue to communicate between 2 threads Write a C program to implement the multi-threaded system
operating system : solve this task please !
use message queue to communicate between 2 threads

Write a C program to implement the multi-threaded system shown in the following Thread 2 onli Up Down Thread 1 You are required to create two threads, communicate via two message queues "Up" and "Down". Thread 1 reads two integer numbers from the standard input and sends it to Thread 2 via the Up queue, then waits for the Thread 2 answer on the Down queue. Thread 2 is specialized in calculation of summation and subtraction of the received two numbers. Therefore for example, if Thread 1 sends the numbers (6,4) via the Up message queue, Thread 2 will read the numbers and calculate the summation and subtraction of the two numbers, and send the results (10,2) via the Down queue. When Thread 1 receives the results from Thread 2, it prints it out on standard output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
