I need to know the advantages and disadvantages of synchronous and asynchronous communication, automatic and explicit buffering, send by copy and send by reference, and fixed-sized and variable-size messages.

Efan Halliday

Efan Halliday

Answered question

2020-12-05

I need to know the advantages and disadvantages of synchronous and asynchronous communication, automatic and explicit buffering, send by copy and send by reference, and fixed-sized and variable-size messages.

Answer & Explanation

SchepperJ

SchepperJ

Skilled2020-12-06Added 96 answers

synchronous and asynchronous communication:
Communication between processes takes place by calls to send ( )and receive ( ) primitive. Message passing may be either blocking (synchronous) or non blocking (asynchronous).
Blocking send :- The sending process is blocked until the message is received by the receiving process or by the mailbox
Non blocking send: - The sending process sends the message and resumes operation.
Blocking receive: - The receiver blocks until a message is available.
Non Blocking receive: - The receiver retrieves either a valid message or a null.
(b) Automatic and Explicit Buffering:-
Communication may be director indirect message passing technique. These messages reside in a temporary queue. There are three different ways to implement such a queue.
Zero capacity: - The maximum length of queue is zero. The sender must block until the recipient receives the message.
Bounded capacity: - The queue has a finite length n. Of the queue is not full, when a new message is sent, the message is placed on the queue. And the sender can continue execution without waiting. If the queue is full, the sender must be blocked until space is available in the queue.
Unbounded Capacity: The queue has infinite length. Hence any number of messages can wait in it. The sender never blocks.
Bounded capacity and unbounded capacity is referred as automatic buffering whereas zero-capacity is called explicit buffering.
Send by copy and send by reference :
A message are sent to and received frommailboxes called ports. A system calls are made by message when atask is created, two special mail boxes are created. They are kernel mailbox and Notify mail box. Three system calls are needed for message transfer. They are message send (msg – send) call, which sends a message to mail box. Another is message receive (msg – receive) call, which receive a message and lastly is remote procedure calls also called as RPCs, which are executed via msg-rpe, which sends a message and waits for exactly one return message from the sender.
Public interface channel-work
{
// sends a message to the channel
public abstract void send (object item);
//Receive a message from channel
public abstract object receive ( );
}
Fixed-sized and variable-sized message :-
In fixed-size message passing, fixed-size messages can be sent, the system-level implementation is straight forward .This restriction,however, makes the task of programming more difficult. Conversely,variable sized messages require a more complex system-level implementation, but the programming task becomes simpler.
A message consists of a fixed-length header, followed by avariable-length header, followed by a variable - length dataportion. The header includes the length of message and two mailboxnames. When a message is sent, one mailbox is name is message send mailbox and where it is received is called message receive mailbox.The variable part of a message is a list of typed data items. Each entry in the list has a type, size and value. The type of objects specified in the message is important.
Most communications circuits perform functions described in the physical and data link and data link layer of the OSI Model. There are two general strategies for communicating over a physical link: Asynchronous and Synchronous. Each has its
Don Sumner

Don Sumner

Skilled2023-06-17Added 184 answers

Advantages and Disadvantages:
Synchronous communication:
Advantages: + Immediate response, + Real-time interaction.
Disadvantages: Dependency on availability, Increased complexity.
Asynchronous communication:
Advantages: + Flexibility in timing, + Reduced waiting time.
Disadvantages: Lack of immediate feedback, Potential data inconsistency.
Automatic buffering:
Advantages: + Seamless data transfer, + Efficient resource utilization.
Disadvantages: Increased memory overhead, Latency due to buffering.
Explicit buffering:
Advantages: + Control over data transfer, + Ability to manage resources.
Disadvantages: Manual handling required, Potential for deadlock or resource contention.
Send by copy:
Advantages: + Data integrity, + Independent processing.
Disadvantages: Increased memory consumption, Copying overhead.
Send by reference:
Advantages: + Memory efficiency, + Reduced data duplication.
Disadvantages: Data sharing concerns, Potential for unintended modifications.
Fixed-sized messages:
Advantages: + Predictable message handling, + Efficient memory allocation.
Disadvantages: Limitation on data size, Potential wastage of memory for small messages.
Variable-sized messages:
Advantages: + Flexibility in data size, + Efficient memory utilization.
Disadvantages: Increased complexity, Memory fragmentation.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?