Question: Problem 4 ( 2 0 ) The functions Send ( . ) and Receive ( . ) are used for sending and receiving messages for

Problem 4(20)
The functions Send(.) and Receive(.) are used for sending and receiving messages for inter-process communication, respectively.
Send(void *sendbuf, int nelems, int dest): Send nelems elements saved in buffer sendbuf to the destination process dest.
Receive(void *recvbuf, int nelems, int source): Receive nelems elements saved in buffer recvbuf, which is sent from the process source.
We have two different methods for inter-process communication.
Method 1: The process executing send(.) is blocked when the other process is not executing the corresponding receive(.).
Method 2: The process executing send(.) puts the message in buffer, which is transmitted to the receiver side via hardware, and returns, but the process executing receive(.) is blocked when the message is not available. This method does not block the sender, but it may block the receiver.
Consider the following two cases 1) and 2) for communications between process 0 and process 1.
Case 1)
P0:
Receive(&a,1,1
 Problem 4(20) The functions Send(.) and Receive(.) are used for sending

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!