implemented in both Process and Thread Version asks to write a multi-threaded pr
ID: 642134 • Letter: I
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.