Write a manager/worker program to determine the prime numbers from 1 to 1,000,000

computer science

Description

Ubuntu 15.10 – Operating System: (using C /C++) Write a manager/worker program to determine the prime numbers from 1 to 1,000,000. The manager program should calculate the prime numbers from 1 to 1000 and then spawn 10 child processes each of which will determine the prime numbers in a range of multiples of 100,000. Thus one child process will calculate the prime numbers from 1,001 to 100,000. the second child process will calculate the primes from 100,001 to 200,000, the third does 200,001 to 300,000, and so on. Use pipes to between the manager and worker processes. The manager should output the sorted list of prime numbers to a single, comprehensive, output file. Document your program with comments clearly. Include information about how to compile, and execute your program.


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.