Question: It's for parallel programming 1st Lab Exercise for Chapter 7-Load Balancing Using the Pipeline Structure This programming exercise is from the textbook Problem 7-2 in
1st Lab Exercise for Chapter 7-Load Balancing Using the Pipeline Structure This programming exercise is from the textbook Problem 7-2 in Page 225 Write a parallel Program that will implement the load-balancing technique using the pipeline structure described in Section 7.2.3 for any arbitrary set of independent arithmetic tasks. Please follow the following guidelines in writing your program: 1. Make Process O generate a set of tokens (e.g., integers). Process 0 doesn't participate in task processing. Instead, it passes tokens alone to pipeline to other processes, and print a message when the program is terminating. The number of tokens must be several times larger than the number of processes. 2. Use the structure in Figure 7.7 and the codes in Page 209 to organize your coding. Make each process sleep for 1 second when it takes a "task" to process, i.e, pulling out a token from the buffer to process. 3. When the program terminates, each process prints a message showing its rank and the number of "tasks" it has processes. 4. Process 0 sends a termination token to other processes when all tokens have been sent out. Each process terminates when it receives the termination token and has finished all "tasks" from the local buffer. 5. Demonstrate your program on the due date
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
