Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need 2 applications/solutions as per the question; one using multiple process and the other multiple threads. and at the end we compare the performance

image text in transcribed

I need 2 applications/solutions as per the question; one using multiple process and the other multiple threads. and at the end we compare the performance of each

for the text file, please name it as such in your code and provide it for me so I can use it too.

as for the table, basically use the output numbers and generate a graph from excel.

kindly use c++ only.

Create two applications that will calculate basic statistics about a collection of data using multiple process and multiple threads respectively. The master thread/parent process should read the data from a file and then spawn the child threads/child processes to process the data. Example: gbarlas@kinpenguin: $./ statFork 4 data.txt Min: -10 Max: 1253 Average: 128.64 should generate four child processes (so five in total) to process the data. A similar convention of calling should be done for the multi-threaded program. E.g. gbarlas@kinpenguin: $./ statThread 4 data.txt Min: -10 The data file should be a text file that has a number per line and starts with the total number of data items in the first line. E.g.: 1000 346.4 7798.2 ... // 998 more lines follow Use pipelines to allow the parent process collection of the partial results from the children. In the case of threads, shared data can be utilized. Once you complete and test your code, test and compare the performance of the two programs for different number of child processes and threads, i.e. find the execution times and calculate the speedup (the parent should be also computing part of the result). A graph showing your results for 2,4,6 and 8 processes/threads should be provided

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago

Question

What is job enlargement ?

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago