implemented in both Process and Thread Version asks to write a multi-threaded program to calculate the average,
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. 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.
Management Accounting Information for Decision-Making and Strategy Execution
ISBN: 978-0137024971
6th Edition
Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young