Write Program Creates Multiple Worker Threads Calculate Sum Float Point Values Saved File Q37143918

Write a program that creates multiple workerthreads to calculate the sum of float point valuessaved in a file. Each thread calculates a partial sum, and the mainthread adds up the partial sums. Your program will read the floatpoint values from a file and print out the sum on the screen. Thenumber of worker threads, as well as the file containing the floatpoint values, are specified in the command line. For example.

problem_1 4 ./file_containing_values

You may use gendata.c attached with major homework 3 to generatethe file. Your main thread can memory-map the file, such that theworker threads can access the float point

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.