The goal of this assignment is to implement a threshold-based symmetrically initiated scheduling algorithm. The algorithm should be applied to an application that factors a large product-of-two-large-primes number in parallel by trial and error division. The program should be written over your RPC system from assignment 1. The work should be farmed out by a coordinator process, and the worker processes should maintain queues of work that are accessable by the scheduling algorithm, which also carries out communication via RPC calls. (All communication between processes in your solution should use RPC for communication). The program should be highly configurable, allowing the user to specify the number of processes, the number of ranges at each process (different processes should be able to contain different numbers of ranges), the range of values to try in each piece of work, and the thresholds for becoming a sender or receiver. Configuring these parameters should allow us to simulate load in the system and better observe how the algorithm operates. For example, if two processes, A and B, with 5 worker ranges a piece, are each given 10 ranges of values, but A is given ranges consisting of 1000 numbers and B is given ranges consisting of 10000, then A should finish before B, thereby potentially initiating a transfer of work. The output of your program should "trace" the operation of the program, including when work is transferred between processes, which ranges were completed by which processes, etc., in addition to the number's factors (the number will be a product of two large primes). Your design should keep the scheduling code as separate from the factoring part of the algorithm as possible. In other words, your scheduling algorithm should be able to be easily plugged in and used with a different but similarly "embarassingly parallel" program. In particular, this means that you should probably have one component of your program that implements the scheduling algorithm, and others that do the work. Turn in a writeup describing the implementation of your algorithm and your design choices (choice of load index, method for selecting and migrating work, etc.). Notice that the specification of the assignment is vague; I expect as many different designs and implementations as there are students in the class. Also, turn in traces that show that the algorithm works differently in a "simulation" of a heavily loaded environment than a light one.
## Deliverables
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Detailed writeup describing the various design choices and the implementation of the program. Complete copyrights to all work purchased.
## Platform
Sun Solaris , C/ C++