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.
Get Free Quote!
347 Experts Online