Home / Questions / Problem Overview You must use fork and pipe to complete this project This project create...

Problem Overview You must use fork and pipe to complete this project This project creates processes to add all numbers in a file The user will enter a number of parallel processes to

Problem Overview

You must use fork and pipe to complete this project.

This project creates processes to add all numbers in a file. The user will enter a number (1, 2, or 4) of parallel processes to create for processing the numbers. Thesystem will then create this many processes, evenly dividing the file contents between the processes. For example, if the file has 1000 numbers and the user wants 4processes, then each process would process 250 numbers in the file.



III. System Description


The system is illustrated in the diagram shown below. The processes are as follows:

1. Parent process. This process allows user to input the number of processes to create (1, 2, or 4). It determines what portion of the file each process must work onand informs the process via a pipe. It then waits for each child to report its result. Once each result is received, it combines the results prints the overallresult.
2. Child process. Receive which part of the file to process. Process the file and send results back to the parent process.

Note: there are three data files given with random number which are need to be read.
thanks.And these files are read through user command.Please make relevant comments.

May 27 2020 Read more Less More

Answer (Solved)

question Subscribe To Get Solution

Recent Questions

Chat Now

Welcome to Live Chat

Welcome to MyCourseHelp Services, World's leading Academic solutions provider with Millions of Happy Students.

Please fill in the form