Open In App

Utopian Simplex Protocol in Computer Network

Last Updated : 26 Apr, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

We will consider a protocol that is simply because it does not worry about the possibility of anything going wrong. Data are transmitted in one direction only. Both transmitting and receiving network layers are always ready. Processing time can be ignored. Infinite buffer space is available. This thoroughly unrealistic protocol, which we will nickname “Utopia”, is simply to show the basic structure on which we will build. Its implementation is shown below.

Utopian simplex Protocol: There is one direction of data transmission only from sender to receiver. Here we assume the communication channel to be error-free and the receiver will infinitely quickly process the input. The sender pumps out the data onto the line as fast as it can.

typedef enum {frame_arrival} event_type;

#include"protocol.h"

void sender1(void)
{
 frame s;                     /* buffer for an outbound frame */
 packet buffer;                /* buffer for an outbound packet */
 while(true)
 {
  from_network_layer(&buffer);   /* go get something to send */
  s.info=buffer;               /* copy it into s for transmission */
  to_physical_layer(&s);        /* send it on its way */
 }                           
}

void receiver1(void)
{
 frame r;
 event_type event;             /* filled in by wait, but not used here */
 while(true)
  {
   wait_for_event(&event);       /* only possibility is frame_arrival */
   from_physical_layer(&r);      /* go get the inbound frame */
   to_network_layer(&r.info);     /* pass the data to the network layer */
  }
}

This protocol has two different procedures, a sender and a receiver. MAX_SEQ is not needed because no sequence numbers or acknowledgements are used. The only event type possible is frame_arrival (i.e. the arrival of an undamaged frame). The sender pumps out the data in an infinite while loop as fast as it can. The loop body consists of three actions and they are –

  • Fetch a packet from the network layer,
  • Construct an outbound frame using the variable s,
  • Send the frame on its way.

Other fields have to do with error and flow control and there are no errors or flow control restrictions here so only the info field is used here. The receiver is equally simple. The procedure wait_for_event returns when the frame arrives and the event is set to frame_arrival. The newly arrived frame from the hardware buffer is removed by the call from_physical_layer and put in the variable r, so that receiver can get it. The data link layer settles back to wait for the next frame when the data portion is passed on to the network layer, suspending itself until the frame arrives. It does not handle either flow control or error correction therefore it is unrealistic.

Properties of Utopian Simplex Protocol:

  • The design of Utopian Simplex Protocol is based on 2 procedures i.e. Sender and Receiver.
  • Both Sender and Receiver run in the data link layer but the sender runs in the data link layer of the source machine while Receiver runs in datalink layer of the destination machine.
  • It is designed for Uni-directional data transmission.
  • Sender and receiver are always ready for data processing.
  • Both of them have infinite buffer space available.
  • The communication links never losses any data frames.
  • It is considered as unrealistic as it does not handle flow control or error correction.
  • The protocol assumes that the communication channel is dedicated to the sender and receiver, and no other device can interfere with the transmission.
  • The sender and receiver have the same clock rate, so there is no need for any synchronization mechanism between them.
  • The protocol assumes that the data frames are of fixed size and known to both sender and receiver.
  • There is no need for any addressing mechanism, as the receiver is assumed to be the only device connected to the channel.
  • The protocol does not support retransmission of lost or corrupted frames, as it assumes that the communication channel never loses any data.
  • There is no provision for multiplexing or demultiplexing of data streams, as the channel is dedicated to a single sender-receiver pair.
  • The protocol does not provide any mechanism for detecting errors in the received data frames, as it assumes that the communication channel is error-free.
  • The protocol is designed for simple, one-way communication scenarios, and is not suitable for complex, bi-directional data transfers.

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads