PrepAway - Latest Free Exam Questions & Answers

What should you do?

You are creating an application that uses Microsoft Message Passing Interface (MPI). The library has the following communication primitives:
Blocking communication primitives like send and receive operations Non-blocking communication primitives like n_send and n_receive operations You write the following code segment for the processes named P0 and P1 in the application.
(Line numbers are included for reference only.)

01 P0:
02 for (i = 0; i < 1000; i++) {
03 produce_data(&data[i]);
04 send(&data[i], 1, P1);
05 }
06
07 P1:
08 for (i = 0; i < 1000; i++) {
09 receive(&a, 1, P0);
10 process_data(&a);
11 }

Users report that the application processes data slowly. You need to ensure that the application processes data quickly.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Split the P0 process into 1,000 separate processes.

B.
Split the P1 process into 1,000 separate processes.

C.
Replace the send operation with the n_send operation in the P0 process.

D.
Replace the receive operation with the n_receive operation in the P1 process.


Leave a Reply