Question: implemented in both Process and Thread Version asks to write a multi-threaded program to calculate the average, min, and max of of list of numbers.

implemented in both Process and Thread Version

asks to write a multi-threaded program to calculate the average, min, and max of of list of numbers. You should also use fork() system calls to create three child processes, each calculating average, min, and max. For process case, because parent and child processes have their own copies of data (even for global data!), it will be necessary to the child to output the results. For thread case, since parent thread and worker threads share global variables, the worker threads will set the values of the global variables, and the parent thread will output the values once the workers have exited.


Step by Step Solution

3.51 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To write a multithreaded program to calculate the average min and max of a list of numbers you can u... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!