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
To write a multithreaded program to calculate the average min and max of a list of numbers you can u... View full answer
Get step-by-step solutions from verified subject matter experts
