Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I need help writing a c++ program. This project creates processes to add all the values. Your program should ultimately make four passes for

Hello I need help writing a c++ program. This project creates processes to add all the values. Your program should ultimately make four passes for each of the small medium and large calculations. On the first pass your program should use 1 process, the second pass 2, the third pass 4 and the final pass 8. You program should evenly divide the work between the processes.

The task will be to add up hyperbolic tangents for a series of values between 0 and 1. The summary section should discuss the results of running a single process versus multiple processes on adding the values. You should complete Table 1 and discuss your result.

The summary section should include three parts:

  1. Record the running time in Tables.
  2. Discuss your results.
  3. Explain all results

Table 1

CPU usage time (msec)

Small

Medium

Large

1 Process

2 Processes

4 Processes

8 Processes

Calculations

100,000,000*

1,000,000,000*

10,000,000,000*

Table 2

Wall clock/Calendar time (msec)

Small

Medium

Large

1 Process

2 Processes

4 Processes

8 Processes

Calculations

100,000,000*

1,000,000,000*

10,000,000,000*

Table 3

Construct a third table, of your own design that show the CPU time that each process used of completing the each of the tasks.

*Calculations shown are approximate. Your table should show the actual calculation count.

In order to get measurable results, you will need to do a large number of calculations.

The number of calculations is approximately:

Small = 100,000,000 (100 million)

Medium = 1,000,000,000 (one billion)

Large = 10,000,000,000 (ten billion)

image text in transcribed

The system is illustrated in the diagram shown below. The processes are as follows: 1. Parent process. Your program creates the desired number of processes of processes to create (1, 2, 4 or 8). It determines what portion of the task each process must work on and informs the process via a pipe. More specifically, the first child process handles the first part of the task, the second child process handles the second one and so on. The parent then waits for each child to report its result. Once each result is received, it combines the results and prints the overall result. Child process. Receives which part of the file to process. Process the file and send results back to the parent process. 2. The system is illustrated in the diagram shown below. The processes are as follows: 1. Parent process. Your program creates the desired number of processes of processes to create (1, 2, 4 or 8). It determines what portion of the task each process must work on and informs the process via a pipe. More specifically, the first child process handles the first part of the task, the second child process handles the second one and so on. The parent then waits for each child to report its result. Once each result is received, it combines the results and prints the overall result. Child process. Receives which part of the file to process. Process the file and send results back to the parent process. 2

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

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions